Skip to content

Commit e933051

Browse files
committed
better explain area queries
1 parent ce2f342 commit e933051

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

c/uwapi/uwapi/modules/botsConnection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern "C"
5656
// connect
5757

5858
UNNATURAL_API void uwSetConnectStartGui(bool enabled, const char *extraCmdParams);
59-
UNNATURAL_API void uwSetConnectAsync(bool async);
59+
UNNATURAL_API void uwSetConnectAsync(bool enabled);
6060
UNNATURAL_API bool uwConnectFindLan(uint64 timeoutMicroseconds);
6161
UNNATURAL_API void uwConnectDirect(const char *address, uint16 port);
6262
UNNATURAL_API void uwConnectLobbyId(uint64 lobbyId);

csharp/uwapi/interop.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public static extern void uwSetConnectStartGui([MarshalAs(UnmanagedType.I1)] boo
154154
[MarshalAs(UnmanagedType.LPStr)] string extraCmdParams);
155155

156156
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
157-
public static extern void uwSetConnectAsync([MarshalAs(UnmanagedType.I1)] bool async);
157+
public static extern void uwSetConnectAsync([MarshalAs(UnmanagedType.I1)] bool enabled);
158158

159159
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
160160
[return:MarshalAs(UnmanagedType.I1)]

python/uwapi/bots.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void uwSetConnectionStateCallback(UwConnectionStateCallbackType callback);
131131
UwConnectionStateEnum uwConnectionState(void);
132132

133133
void uwSetConnectStartGui(bool enabled, const char *extraCmdParams);
134-
void uwSetConnectAsync(bool async);
134+
void uwSetConnectAsync(bool enabled);
135135
bool uwConnectFindLan(uint64 timeoutMicroseconds);
136136
void uwConnectDirect(const char *address, uint16 port);
137137
void uwConnectLobbyId(uint64 lobbyId);

python/uwapi/interop.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,8 @@ def uwSetConnectStartGui(self, enabled: bool, extraCmdParams: str) -> None:
642642
extraCmdParams_ = self._str_pytoc(extraCmdParams)
643643
self._api.uwSetConnectStartGui(enabled, extraCmdParams_)
644644

645-
def uwSetConnectAsync(self, async: bool) -> None:
646-
self._api.uwSetConnectAsync(async)
645+
def uwSetConnectAsync(self, enabled: bool) -> None:
646+
self._api.uwSetConnectAsync(enabled)
647647

648648
def uwConnectFindLan(self, timeoutMicroseconds: int) -> bool:
649649
ret = self._api.uwConnectFindLan(timeoutMicroseconds)

sphinx/source/bots/programOverview.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ The game is designed for multiplayer, and always plays over network, even in sin
106106

107107
Any actions that you do in your program are first send to the game server, then processed, and then the results are send back to your client.
108108

109+
.. important::
110+
Some actions will *not* appear until after round-trip to server. Eg. placing a construction.
111+
109112
Example: you call a function to place a construction.
110113
After that you look through all the entities and the construction is not there, as expected.
111114
You will not know the id of the entity either.

sphinx/source/concepts/map.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ There are multiple functions for finding tiles within some distance.
5656

5757
**Area Range**
5858

59+
Given *3D coordinates* and a radius, returns all tiles within the defined sphere, including tiles that may appear opposite of the rest.
60+
5961
.. grid-item::
6062

6163
.. card::
@@ -64,6 +66,8 @@ There are multiple functions for finding tiles within some distance.
6466

6567
**Area Connected**
6668

69+
Given *tile-index* as center, and a radius, returns tiles that are connected to the center within the radius.
70+
6771
.. grid-item::
6872

6973
.. card::
@@ -72,6 +76,8 @@ There are multiple functions for finding tiles within some distance.
7276

7377
**Area Neighborhood**
7478

79+
Returns tiles that are direct neighbors of area connected query. Usually looks like a ring.
80+
7581
.. grid-item::
7682

7783
.. card::
@@ -80,6 +86,8 @@ There are multiple functions for finding tiles within some distance.
8086

8187
**Area Extended**
8288

89+
Returns a union of the connected and the neighboring tiles.
90+
8391
.. tab-set::
8492
:sync-group: language
8593

0 commit comments

Comments
 (0)