diff --git a/docs/index.rst b/docs/index.rst index 45672626e0d7e1effeb0569c77940e5c84f59ff6..4fdbdac0d5f72ee644505213e45908ff0dd82cc7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,6 +9,7 @@ This is a Python module for implementing bots for Starcraft II. unit managers + playerconstants Short overview ============== @@ -17,10 +18,6 @@ Short overview :toctree: _autosummary library - library.PLAYER_SELF - library.PLAYER_ENEMY - library.PLAYER_NEUTRAL - library.PLAYER_ALLY library.ABILITY_ID library.BUFF_ID library.BaseLocation diff --git a/docs/playerconstants.rst b/docs/playerconstants.rst new file mode 100644 index 0000000000000000000000000000000000000000..20f5d8308cc997b16a81b1e41d445aea6057ca14 --- /dev/null +++ b/docs/playerconstants.rst @@ -0,0 +1,12 @@ +Player constants +================ + +The following constants are used when referring to a player: + +.. autoclass:: library.PLAYER_SELF +.. autoclass:: library.PLAYER_ENEMY +.. autoclass:: library.PLAYER_NEUTRAL +.. autoclass:: library.PLAYER_ALLY + +These are internally represented as integers, but these constants should be +used instead to avoid confusion. diff --git a/docs/unit.rst b/docs/unit.rst index c07a12ac2750140e4394b6ba401a58e48fed64b6..0016204a7399a05ac5975e5418788337c9609236 100644 --- a/docs/unit.rst +++ b/docs/unit.rst @@ -38,6 +38,11 @@ Unit .. attribute:: Unit.player .. TODO: Add page about PLAYER_* constants + + Returns the constant corresponding to player which this unit belongs to. + See the page :doc:`playerconstants` for more information on player + constants. + .. autoattribute:: position .. autoattribute:: shields .. autoattribute:: tile_position