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

Solve issue of function not working by documenting how to solve it yourself

parent b4cd2d33
No related branches found
No related tags found
No related merge requests found
...@@ -46,11 +46,11 @@ BaseLocation ...@@ -46,11 +46,11 @@ BaseLocation
the BaseLocationManager to keep track of all base locations and related the BaseLocationManager to keep track of all base locations and related
information. information.
.. attribute:: position .. attribute:: library.BaseLocation.position
The position of the center of the BaseLocation, defined as a :class:`library.Point2D`. The position of the center of the BaseLocation, defined as a :class:`library.Point2D`.
.. attribute:: depot_position .. attribute:: library.BaseLocation.depot_position
A suitable position for building a town hall (Command Center, Hatchery or A suitable position for building a town hall (Command Center, Hatchery or
Nexus), defined as a :class:`library.Point2DI`. Nexus), defined as a :class:`library.Point2DI`.
...@@ -131,3 +131,9 @@ BuildingPlacer ...@@ -131,3 +131,9 @@ BuildingPlacer
.. autoclass:: library.BuildingPlacer .. autoclass:: library.BuildingPlacer
:members: :members:
:undoc-members: :undoc-members:
This class is useful for placing all buildings, except refineries and town halls (Command Centers, Hacheries and Nexus).
If you want to place a town hall, take a look at attribute `depot_location` of :class:`library.BaseLocation`.
If you want to place a refinery, take a look at attribute `geysers` of :class:`library.BaseLocation` and the method build_target of :class:`library.Unit`.
...@@ -10,6 +10,4 @@ void define_building_placer(py::module & m) ...@@ -10,6 +10,4 @@ void define_building_placer(py::module & m)
.def("get_build_location_near", &BuildingPlacer::getBuildLocationNear, "point2di"_a, "unit_type"_a, "build_distance"_a) .def("get_build_location_near", &BuildingPlacer::getBuildLocationNear, "point2di"_a, "unit_type"_a, "build_distance"_a)
.def("reserve_tiles", &BuildingPlacer::reserveTiles, "x"_a, "y"_a, "width"_a, "height"_a) .def("reserve_tiles", &BuildingPlacer::reserveTiles, "x"_a, "y"_a, "width"_a, "height"_a)
.def("free_tiles", &BuildingPlacer::freeTiles, "x"_a, "y"_a, "width"_a, "height"_a); .def("free_tiles", &BuildingPlacer::freeTiles, "x"_a, "y"_a, "width"_a, "height"_a);
// TODO: Update this method to find refinery positions outside the first base
//.def("get_refinery_position", &BuildingPlacer::getRefineryPosition);
} }
\ No newline at end of file
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