From 440dd39af74ae7a286fb4086bc38c1001617d21d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <davbe125@student.liu.se>
Date: Fri, 31 Aug 2018 11:43:55 +0200
Subject: [PATCH] Solve issue of function not working by documenting how to
 solve it yourself

---
 docs/perception.rst                    | 10 ++++++++--
 python-api-src/lib_building_placer.cpp |  2 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/docs/perception.rst b/docs/perception.rst
index 9bbbe07a3..98ed84f1b 100644
--- a/docs/perception.rst
+++ b/docs/perception.rst
@@ -46,11 +46,11 @@ BaseLocation
    the BaseLocationManager to keep track of all base locations and related
    information.
 
-   .. attribute:: position
+   .. attribute:: library.BaseLocation.position
 
       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
       Nexus), defined as a :class:`library.Point2DI`.
@@ -131,3 +131,9 @@ BuildingPlacer
 .. autoclass:: library.BuildingPlacer 	
    :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`.
diff --git a/python-api-src/lib_building_placer.cpp b/python-api-src/lib_building_placer.cpp
index 0102dd8a3..5de5428a2 100644
--- a/python-api-src/lib_building_placer.cpp
+++ b/python-api-src/lib_building_placer.cpp
@@ -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("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);
-        // TODO: Update this method to find refinery positions outside the first base
-        //.def("get_refinery_position", &BuildingPlacer::getRefineryPosition);
 }
\ No newline at end of file
-- 
GitLab