Skip to content
Snippets Groups Projects
Commit 1fc8bfaa authored by David Bergström's avatar David Bergström
Browse files

Merge branch 'master' into 'master'

Master

See merge request starcraft-ai-course/pycommandcenter!4
parents 7fb62b83 0d81546d
No related branches found
No related tags found
1 merge request!4Master
Pipeline #6650 passed
......@@ -48,6 +48,7 @@ void TechTree::onStart()
data.requiredUnits.clear();
data.requiredUpgrades.clear();
updated.insert(description.result_type);
data.buildTime = description.buildTime; // The time in seconds it takes to create the unit
data.buildAbility = sc2::ABILITY_ID::INVALID;
}
......
......@@ -116,6 +116,7 @@ void parse_build_description(BuildDescription & description, json & build_item)
{
description.result_type = static_cast<sc2::UNIT_TYPEID>(build_item["unit"]);
description.build_ability = static_cast<sc2::ABILITY_ID>(build_item["ability"]);
description.buildTime = static_cast<int>(build_item["time"]); // The time in seconds it takes to create the unit parsed from the json file
if (build_item.find("requires") != build_item.end())
{
......
......@@ -18,6 +18,7 @@ struct BuildDescription
std::vector<sc2::UNIT_TYPEID> buildings_needed;
std::vector<sc2::UNIT_TYPEID> addons_needed;
std::vector<sc2::UPGRADE_ID> upgrades_needed;
int buildTime; // The time in seconds it takes to create the unit
};
struct ResearchDescription
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment