From a289d802b9c76129f2a839877240578b217076b4 Mon Sep 17 00:00:00 2001 From: Sofia Abaied <trollis76@gmail.com> Date: Tue, 18 Dec 2018 15:31:17 +0100 Subject: [PATCH] improved function names --- python-api-src/lib_unit.cpp | 2 +- python-api-src/lib_unittype.cpp | 2 +- src/Unit.cpp | 2 +- src/Unit.h | 2 +- src/UnitType.cpp | 2 +- src/UnitType.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python-api-src/lib_unit.cpp b/python-api-src/lib_unit.cpp index 7a7ee50..9ba780f 100644 --- a/python-api-src/lib_unit.cpp +++ b/python-api-src/lib_unit.cpp @@ -30,7 +30,7 @@ void define_unit(py::module & m) .def_property_readonly("has_target", &Unit::hasTarget) .def_property_readonly("max_hit_points", &Unit::getMaxHitPoints) .def_property_readonly("progress", &Unit::getProgress) - .def_property_readonly("ability_id", &Unit::getAbilityID, "The AbilityID of currently used ability") + .def_property_readonly("current_ability_id", &Unit::getCurrentAbilityID, "The AbilityID of currently used ability") .def_property_readonly("facing", &Unit::getFacing) .def_property_readonly("radius", &Unit::getRadius) .def("hold_position", &Unit::holdPosition) diff --git a/python-api-src/lib_unittype.cpp b/python-api-src/lib_unittype.cpp index edeebea..1b0da07 100644 --- a/python-api-src/lib_unittype.cpp +++ b/python-api-src/lib_unittype.cpp @@ -12,7 +12,7 @@ void define_unittype(py::module & m) .def_property_readonly("race", &UnitType::getRace) .def_property_readonly("movement_speed", &UnitType::getMovementSpeed) .def_property_readonly("sight_range", &UnitType::getSightRange) - .def_property_readonly("tech_requirement", &UnitType::getTechRequirement) + .def_property_readonly("required_structure", &UnitType::getRequiredStructure) .def_property_readonly("is_valid", &UnitType::isValid) .def_property_readonly("is_building", &UnitType::isBuilding) .def_property_readonly("is_combat_unit", &UnitType::isCombatUnit, "The unit is not any of the following: worker, supply provider, building, larva, egg") diff --git a/src/Unit.cpp b/src/Unit.cpp index b47005e..24236d4 100644 --- a/src/Unit.cpp +++ b/src/Unit.cpp @@ -370,7 +370,7 @@ float Unit::getProgress() const return -1; } -sc2::AbilityID Unit::getAbilityID() const +sc2::AbilityID Unit::getCurrentAbilityID() const { BOT_ASSERT(isValid(), "Unit is not valid"); diff --git a/src/Unit.h b/src/Unit.h index 2a645b5..773962f 100644 --- a/src/Unit.h +++ b/src/Unit.h @@ -52,7 +52,7 @@ public: Unit getTarget() const; CCHealth getMaxHitPoints() const; float getProgress() const; - sc2::AbilityID getAbilityID() const; + sc2::AbilityID getCurrentAbilityID() const; void holdPosition() const; void patrol(const CCPosition & targetPosition) const; void stopDance() const; diff --git a/src/UnitType.cpp b/src/UnitType.cpp index 44225ed..b1124c1 100644 --- a/src/UnitType.cpp +++ b/src/UnitType.cpp @@ -383,7 +383,7 @@ int UnitType::getSightRange() const return m_bot->Observation()->GetUnitTypeData()[m_type].sight_range; } -sc2::UnitTypeID UnitType::getTechRequirement() const +sc2::UnitTypeID UnitType::getRequiredStructure() const { return m_bot->Observation()->GetUnitTypeData()[m_type].tech_requirement; } diff --git a/src/UnitType.h b/src/UnitType.h index ceaaef3..72ea028 100644 --- a/src/UnitType.h +++ b/src/UnitType.h @@ -25,7 +25,7 @@ public: int getMovementSpeed() const; int getSightRange() const; - sc2::UnitTypeID getTechRequirement() const; + sc2::UnitTypeID getRequiredStructure() const; bool isValid() const; bool isBuilding() const; -- GitLab