From 945f6c68382fd1292091e2a3fc1c2a9350d168b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <david.bergstrom@liu.se> Date: Fri, 6 Aug 2021 13:46:55 +0200 Subject: [PATCH] Fix a few language errors --- docs/coordinates.rst | 4 ++-- python-api-src/lib_unit.cpp | 4 ++-- python-api-src/library.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/coordinates.rst b/docs/coordinates.rst index a9ef7d4..9aca00c 100644 --- a/docs/coordinates.rst +++ b/docs/coordinates.rst @@ -3,9 +3,9 @@ Coordinates The library uses 2 types of coordinate classes. One for integers and one for floats, these are called :class:`library.Point2DI` and -:class:`library.Point2D`. Convertion between the two types is possible by +:class:`library.Point2D`. Conversion between the two types is possible by sending the other type as argument in the constructor. In the case of -Point2D to Point2DI the floating point values will just be casted into +Point2D to Point2DI the floating point values will just be cast into integer values. Both of the types are hashable so they can be used in sets and dictionaries. diff --git a/python-api-src/lib_unit.cpp b/python-api-src/lib_unit.cpp index 99a4f56..e6095a8 100644 --- a/python-api-src/lib_unit.cpp +++ b/python-api-src/lib_unit.cpp @@ -34,7 +34,7 @@ void define_unit(py::module & m) .def_property_readonly("progression_list", &Unit::getAllProgress, "Returns a list containing the progression on all the processes in order. Empty list if no process exists") .def_property_readonly("current_ability_id", &Unit::getCurrentAbilityID, "The AbilityID of currently used ability") .def_property_readonly("facing", &Unit::getFacing, "Direction the unit faces in radians (1 radian == 57.296 degrees)") - .def_property_readonly("radius", &Unit::getRadius, "Retruns the radius of the unit") + .def_property_readonly("radius", &Unit::getRadius, "Returns the radius of the unit") .def_property_readonly("is_carrying_minerals", &Unit::isCarryingMinerals, "Returns if this unit is currently holding minerals") .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.") @@ -55,7 +55,7 @@ void define_unit(py::module & m) .def("move", py::overload_cast<const CCPosition &>(&Unit::move, py::const_)) .def("move", py::overload_cast<const CCTilePosition &>(&Unit::move, py::const_)) .def("right_click", &Unit::rightClick, "Same as right-clicking in the game, for example making workers mine minerals") - .def("repair", &Unit::repair, "Rightclicks on the provided unit in order to repair it") + .def("repair", &Unit::repair, "Right-clicks on the provided unit in order to repair it") .def("build", &Unit::build, "Build unit of type building_type at given position", "building_type"_a, "position"_a) .def("build_target", &Unit::buildTarget, "Build building_type on top of target Unit, useful for building refineries", "building_type"_a, "target"_a) .def("train", &Unit::train, "Train unit of type", "unit_type"_a) diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index fdfe49e..c0687c8 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -102,8 +102,8 @@ PYBIND11_MODULE(library, m) .def("debug_set_energy", &IDABot::DebugSetEnergy, "Set the energy on a unit through debug mode") .def("debug_set_life", &IDABot::DebugSetLife, "Set the life on a unit through debug mode") .def("debug_set_shields", &IDABot::DebugSetShields, "Set the shields on a unit through debug mode") - .def("get_enemy_base_location", &IDABot::GetEnemyBaseLocations, "Return the CCpostion of the enemy base") - .def("move_camera", &IDABot::CameraMove, "Move the camera to the postion", "p"_a) + .def("get_enemy_base_location", &IDABot::GetEnemyBaseLocations, "Return the CCposition of the enemy base") + .def("move_camera", &IDABot::CameraMove, "Move the camera to the position", "p"_a) .def("has_creep", &IDABot::HasCreep, "Returns true if there is creep at position p", "p"_a) .def("ability_for_upgrade", &IDABot::abilityForUpgrade, "Ability that researches this upgrade", "upgrade"_a) .def("upgrade_mineral_cost", &IDABot::UpgradeMineralCost, "Mineral cost of researching the upgrade", "upgrade"_a) -- GitLab