From 582c0b773b79f88695fc56ca02c86a6bc453a48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <david.bergstrom@liu.se> Date: Fri, 22 Nov 2019 11:47:53 +0100 Subject: [PATCH] Correct documentation regarding is_constructing Previously it was documented as an attribute, but it is in fact method. Describe the method, its arguments and its return value. --- docs/unit.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/unit.rst b/docs/unit.rst index 88e0f527e..d2f37afc8 100644 --- a/docs/unit.rst +++ b/docs/unit.rst @@ -48,7 +48,6 @@ Unit Returns build_progress >= 1 - .. autoattribute:: is_constructing .. autoattribute:: is_flying .. autoattribute:: is_idle .. autoattribute:: is_powered @@ -85,6 +84,10 @@ Unit Call an ability directly, different abilities has different targets. Some target the unit itself (no argument), target a point (Point2D as argument) and some target a Unit (instance of Unit as argument). + .. method:: Unit.is_constructing(self, unit_type: library.UnitType) + + Returns true if the unit is currently constructing another unit of type `unit_type`. Note that `unit_type` needs to be an instance of :class:`library.UnitType`. + .. automethod:: stop .. automethod:: attack_unit .. automethod:: attack_move -- GitLab