Skip to content
Snippets Groups Projects
Commit f5bf02aa authored by Daniel de Leng's avatar Daniel de Leng
Browse files

Remove disallowed colons from documentation

parent 71f4164f
No related branches found
No related tags found
No related merge requests found
Pipeline #133148 passed
......@@ -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.
......
......@@ -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.")
......
......@@ -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.")
......
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