From 00e5e5df1df6f2b39ab6fb47ad02b26966916c6d Mon Sep 17 00:00:00 2001 From: Emil <emil.brynielsson.jobb@gmail.com> Date: Fri, 30 Jul 2021 14:29:53 +0200 Subject: [PATCH] typo --- python-api-src/lib_building_placer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-api-src/lib_building_placer.cpp b/python-api-src/lib_building_placer.cpp index 8b4525cb8..56da5e8ff 100644 --- a/python-api-src/lib_building_placer.cpp +++ b/python-api-src/lib_building_placer.cpp @@ -5,9 +5,9 @@ namespace py = pybind11; void define_building_placer(py::module & m) { py::class_<BuildingPlacer>(m, "BuildingPlacer") - .def("can_build_here", &BuildingPlacer::canBuildHere, "x"_a, "y"_a, "unit_type"_a, "Returns if the provided unittype it possible to be built at the location. Note: This function uses the width and height of the unit and this is not correct for addonds. So to check addons please use can_build_here_with_size with a hardcoded size instead.") + .def("can_build_here", &BuildingPlacer::canBuildHere, "x"_a, "y"_a, "unit_type"_a, "Returns if the provided unittype it possible to be built at the location. Note: This function uses the width and height of the unittype and this is not correct for addons. So to check addons please use can_build_here_with_size with a hardcoded size instead.") .def("can_build_here_with_size", &BuildingPlacer::canBuildHereWithSize, "x"_a, "y"_a, "width"_a, "height"_a, "Checks if it is possible to build something with the provided width and height at the provided coordinates. Note: False if the it overlaps with a baselocation") - .def("can_build_here_with_spaces", &BuildingPlacer::canBuildHereWithSpace, "Creates a square with the help of x, y, distance_to_building and the size of the unit_type. Good approach if we later gonna make a addon to the building. Note: Does not reserve those extra tiles given by distance_to_building for the future! Note: This function uses the width and height of the unit and this is not correct for addonds. So to check addons please use can_build_here_with_size with a hardcoded size instead.", "x"_a, "y"_a, "unit_type"_a, "distance_to_building"_a) + .def("can_build_here_with_spaces", &BuildingPlacer::canBuildHereWithSpace, "Creates a square with the help of x, y, distance_to_building and the size of the unit_type. Good approach if we later gonna make a addon to the building. Note: Does not reserve those extra tiles given by distance_to_building for the future! Note: This function uses the width and height of the unittype and this is not correct for addons. So to check addons please use can_build_here_with_size with a hardcoded size instead.", "x"_a, "y"_a, "unit_type"_a, "distance_to_building"_a) .def("get_build_location_near", &BuildingPlacer::getBuildLocationNear, "The search_count is how many building we should check (nearby buildings, instead of i < size, we can switch size to search_count). distance_to_building is the distance to the closest building.", "point2di"_a, "unit_type"_a, "distance_to_building"_a = 2, "search_count"_a = 1000) .def("reserve_tiles", &BuildingPlacer::reserveTiles, "It's possible to reserve tiles, which makes it impossible to build at the position given by x and y.", "x"_a, "y"_a, "width"_a, "height"_a) .def("free_tiles", &BuildingPlacer::freeTiles,"Free the tile (x, y) from reservation", "x"_a, "y"_a, "width"_a, "height"_a); -- GitLab