From 0a2c839fe09d1ae8fc69fc800f79aad370e087ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <davbe125@student.liu.se>
Date: Fri, 3 Aug 2018 15:51:24 +0200
Subject: [PATCH] Add more docstrings for unit class

---
 python-api-src/lib_unit.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/python-api-src/lib_unit.cpp b/python-api-src/lib_unit.cpp
index dd8a18b..b664020 100644
--- a/python-api-src/lib_unit.cpp
+++ b/python-api-src/lib_unit.cpp
@@ -31,13 +31,13 @@ void define_unit(py::module & m)
         .def("attack_move", &Unit::attackMove)
         .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)
+        .def("right_click", &Unit::rightClick, "Same as right-clicking in the game, for example making workers mine minerals")
         .def("repair", &Unit::repair)
-        .def("build", &Unit::build, "building_type"_a, "position"_a)
-        .def("build_target", &Unit::buildTarget)
-        .def("train", &Unit::train)
-        .def("morph", &Unit::morph)
-        .def("research", &Unit::research)
+        .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)
+        .def("morph", &Unit::morph, "Morph into type of unit_type", "unit_type"_a)
+        .def("research", &Unit::research, "Research the given :class:`library.UPGRADE_ID`", "upgrade_id"_a)
         .def("__hash__", [](const Unit & unit) { return std::hash<const sc2::Unit *>{}(unit.getUnitPtr()); })
         .def(py::self == py::self)
         .def("__repr__", [](const Unit & unit) { return "<Unit of type: '" + unit.getType().getName() + "'>"; });
-- 
GitLab