diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index a07e0f30b1cee5aa53625f6fa067dec1383457a5..d92cbc72c6d48184facd6d8886cec382ee6c9683 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -39,23 +39,17 @@ PYBIND11_MODULE(library, m) m.attr("PLAYER_NEUTRAL") = py::int_((int) Players::Neutral); m.attr("PLAYER_ALLY") = py::int_((int) Players::Ally); - /* - TODO: BuffID is not defined, defined as following by Blizzard: - typedef SC2Type<BUFF_ID> BuffID; - */ py::class_<sc2::BuffID>(m, "BuffID") .def(py::init<sc2::BUFF_ID>()); py::implicitly_convertible<sc2::BUFF_ID, sc2::BuffID>(); - py::class_<sc2::UnitTypeID>(m, "UnitTypeID") .def(py::init<sc2::UNIT_TYPEID>()) .def("__eq__", [](const sc2::UnitTypeID &value, sc2::UNIT_TYPEID &value2) { return value == value2; }); py::implicitly_convertible<sc2::UNIT_TYPEID, sc2::UnitTypeID>(); - py::class_<sc2::UpgradeID>(m, "UpgradeID") .def(py::init<sc2::UPGRADE_ID>()); diff --git a/src/TechTree.cpp b/src/TechTree.cpp index eb94cc0fa7659edf4e08e9c1f861b7d924d731dc..89d511f7a0d7a0fb8fc752c0c009474cab4d50a8 100644 --- a/src/TechTree.cpp +++ b/src/TechTree.cpp @@ -48,7 +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.buildTime = description.buildTime; // The time in seconds it takes to create the unit data.buildAbility = sc2::ABILITY_ID::INVALID; } @@ -383,4 +383,4 @@ const TypeData & TechTree::getData(const MetaType & type) const BOT_ASSERT(false, "Can't getData this type: %s", type.getName().c_str()); return m_unitTypeData.begin()->second; -} \ No newline at end of file +} diff --git a/src/TechTreeImproved.cpp b/src/TechTreeImproved.cpp index eab4ff200f0af3ee615c2e136c33270e9b2c9b99..7e991fadd4877762531bf4d545a0ad0d870fb8ad 100644 --- a/src/TechTreeImproved.cpp +++ b/src/TechTreeImproved.cpp @@ -116,7 +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 + 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()) { diff --git a/src/TechTreeImproved.h b/src/TechTreeImproved.h index d5134a532acd98cc36968d39eaf698aac51d1dba..1b650e60d8a4f742f2fcce6803e9a8583863058b 100644 --- a/src/TechTreeImproved.h +++ b/src/TechTreeImproved.h @@ -18,7 +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 + int buildTime; // The time in seconds it takes to create the unit }; struct ResearchDescription @@ -53,4 +53,4 @@ public: const std::vector<BuildDescription> & BuildDescriptions() const { return build_descriptions; } const std::vector<ResearchDescription> & ResearchDescriptions() const { return research_descriptions; } -}; \ No newline at end of file +};