Skip to content

Commit d484e99

Browse files
committed
documentation: program safety
1 parent 86b8ddc commit d484e99

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

sphinx/source/bots/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ Specifically, bots cannot cheat - no more than a regular player could.
99
.. toctree::
1010
setup
1111
programOverview
12+
programSafety
1213
troubleshooting
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Program Safety
2+
==============
3+
Memory and threads guarantees of the api.
4+
5+
Memory
6+
------
7+
8+
Memory ownership is never transferred across the api boundary.
9+
Usually, any pointers returned from any of the *c* functions are valid until next call to the same function.
10+
Therefore, most *c* functions are *not* reentrant.
11+
12+
The Python and C# wrappers functions always copy all necessary memory from the provided pointers into the native memory of the language.
13+
Be careful if you use a *c* function directly.
14+
15+
Threads
16+
-------
17+
18+
.. important::
19+
The api is strictly singlethreaded!
20+

sphinx/source/bots/setup.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,12 @@ Game Install Path
3939
:sync: linux
4040

4141
Default path: ``~/.steam/steam/steamapps/common/Unnatural Worlds/bin``
42+
43+
Show Extra Information
44+
----------------------
45+
46+
In the game, navigate to *Options*, *User Interface*, and change *Selected info level* to *Extra*.
47+
This will show you additional information about any single thing you select in the game.
48+
For example: unit id, its state, position (both index and 3D coordinates), etc.
49+
It shows at the bottom of the left panel.
50+

0 commit comments

Comments
 (0)