diff --git a/docs/idareplayobserver.rst b/docs/idareplayobserver.rst index d87c77588dab96f96bc4cdfd12312883f72d733d..d0c9549cfba83573960bb1eb0ba53d8d162a5d9c 100644 --- a/docs/idareplayobserver.rst +++ b/docs/idareplayobserver.rst @@ -7,39 +7,39 @@ IDAReplayObserver Inherited methods: - .. method:: IDAReplayObserver.on_game_start(self) + .. method:: on_game_start(self) This method is called when a replay has started, when you inherit it you have to call the parent's on_game_start method in order to make it work (see :ref:`replays`). - .. method:: IDAReplayObserver.on_step(self) + .. method:: on_step(self) This method is called on every tick of the replay, when you inherit it you have to call the parent's on_step method in order to make it work (see :ref:`replays`). - .. method:: IDAReplayObserver.on_game_end(self) + .. method:: on_game_end(self) This method is called when the replay has ended, when you inherit it you have to call the parent's on_game_start method in order to make it work (see :ref:`replays`). - .. method:: IDAReplayObserver.on_unit_created(self) + .. method:: on_unit_created(self) This method is called when the an unit is created, that includes when an unit leaves a refinery. This only works if replay perspective is not set to 0. - .. method:: IDAReplayObserver.on_unit_destroyed(self) + .. method:: on_unit_destroyed(self) This unit is called when a unit is destroyed. Methods: - .. method:: IDAReplayObserver.get_all_units(self) -> List[commandcenter.ReplayUnit] + .. method:: get_all_units(self) -> List[commandcenter.ReplayUnit] Retrieves a list of all visible units. - .. method:: IDAReplayObserver.get_player_race(self, player_id) -> commandcenter.Race + .. method:: get_player_race(self, player_id) -> commandcenter.Race Returns the player's race. diff --git a/python-api-src/lib_base_location.cpp b/python-api-src/lib_base_location.cpp index 1cc8c10a0eba875a791f6445037c9cc3abc52dda..0241f50cd3805d6d56db12ab402f4d4cd5d173bd 100644 --- a/python-api-src/lib_base_location.cpp +++ b/python-api-src/lib_base_location.cpp @@ -6,9 +6,9 @@ void define_base_location(py::module & m) { py::class_<BaseLocation>(m, "BaseLocation") .def_property_readonly("geysers", &BaseLocation::getGeysers, "List of geysers at base location (List of units).") - .def_property_readonly("minerals", &BaseLocation::getMinerals, "List of mineral fields at base location (List of unit). Note: also returns the empty mineral fields.") - .def_property_readonly("is_start_location", &BaseLocation::isStartLocation, "True if the base location is a start location, False otherwise.") - .def_property_readonly("depot_position", &BaseLocation::getDepotPosition, "A suitable position for building a town hall (Command Center, Hatchery or Nexus), defined as a : class :`library.Point2DI`.") + .def_property_readonly("minerals", &BaseLocation::getMinerals, "List of mineral fields at base location (List of unit). Also returns the empty mineral fields.") + .def("is_start_location", &BaseLocation::isStartLocation, "True if the base location is a start location, False otherwise.") + .def_property_readonly("depot_position", &BaseLocation::getDepotPosition, "A suitable position for building a town hall (Command Center, Hatchery or Nexus), defined as a :class:`library.Point2DI`.") .def_property_readonly("position", &BaseLocation::getPosition, "The position of the center of the BaseLocation, defined as a :class:`commandcenter.Point2D`.") .def("get_ground_distance", py::overload_cast<const CCPosition &>(&BaseLocation::getGroundDistance, py::const_)) .def("get_ground_distance", py::overload_cast<const CCTilePosition &>(&BaseLocation::getGroundDistance, py::const_), "Returns the ground distance between the provided position and the base location. Note that this uses a BFS approach and may overshoot a bit.") diff --git a/python-api-src/lib_unit.cpp b/python-api-src/lib_unit.cpp index 4fe031c4a52d6931de4e5b779f7f6da7a0d947f0..e76574661d75ba17688a082f08f9033ec727a059 100644 --- a/python-api-src/lib_unit.cpp +++ b/python-api-src/lib_unit.cpp @@ -12,7 +12,7 @@ void define_unit(py::module & m) .def_property_readonly("shields", &Unit::getShields, "Shield of the unit.") .def_property_readonly("energy", &Unit::getEnergy, "Energy of the unit.") .def_property_readonly("player", &Unit::getPlayer, "Returns the constant corresponding to player which this unit belongs to. See :ref:`playerconstants` for more information.") - .def_property_readonly("id", &Unit::getID, "Returns an int to identify the unit. Note This value does not stay the same for units you lose vision of, so maybe not best idea to use as a way of keeping track of them.") + .def_property_readonly("id", &Unit::getID, "Returns an int to identify the unit. This value does not stay the same for units you lose vision of, so maybe not best idea to use as a way of keeping track of them.") .def_property_readonly("build_percentage", &Unit::getBuildPercentage, "Gives progress under construction. Range [0.0, 1.0]. 1.0 == finished.") .def_property_readonly("weapon_cooldown", &Unit::getWeaponCooldown, "Time remaining for a weapon on cooldown.") .def_property_readonly("is_completed", &Unit::isCompleted, "Returns build_progress >= 1.") @@ -39,7 +39,7 @@ void define_unit(py::module & m) .def_property_readonly("is_carrying_gas", &Unit::isCarryingGas, "Returns if this unit is currently holding gas.") .def_property_readonly("gas_left_in_refinery", &Unit::gasLeftInGeyser, "Amount of vespene left in the the refinery.") .def_property_readonly("minerals_left_in_mineralfield", &Unit::mineralsLeftInMineralfield, "Amount of minerals if the unit is a mineral field.") - .def_property_readonly("owner", &Unit::getOwner, "Which player owns a unit. Note: Not same as player; 'player' originates from IDA implementation whilst 'owner' originates from StarCraft II.") + .def_property_readonly("owner", &Unit::getOwner, "Which player owns a unit. Not same as player; 'player' originates from IDA implementation whilst 'owner' originates from StarCraft II.") .def_property_readonly("max_shields", &Unit::maxShields, "Max shield of the unit.") .def_property_readonly("max_energy", &Unit::maxEnergy, "Max energy of the unit.")