update docs with NetworkSlot and create_as_hint

This commit is contained in:
Fabian Dill 2022-02-18 18:54:26 +01:00
parent 731eef8c2f
commit 840e634161
2 changed files with 28 additions and 2 deletions

View File

@ -182,7 +182,7 @@ def get_default_options() -> dict:
"output_path": "output",
},
"factorio_options": {
"executable": "factorio\\bin\\x64\\factorio",
"executable": os.path.join("factorio", "bin", "x64", "factorio"),
},
"sm_options": {
"rom_file": "Super Metroid (JU).sfc",
@ -219,7 +219,7 @@ def get_default_options() -> dict:
},
"generator": {
"teams": 1,
"enemizer_path": "EnemizerCLI/EnemizerCLI.Core.exe",
"enemizer_path": os.path.join("EnemizerCLI", "EnemizerCLI.Core.exe"),
"player_files_path": "Players",
"players": 0,
"weights_file_path": "weights.yaml",

View File

@ -119,6 +119,7 @@ Sent to clients when the connection handshake is successfully completed.
| missing_locations | list\[int\] | Contains ids of remaining locations that need to be checked. Useful for trackers, among other things. |
| checked_locations | list\[int\] | Contains ids of all locations that have been checked. Useful for trackers, among other things. Location ids are in the range of ± 2<sup>53</sup>-1. |
| slot_data | dict | Contains a json object for slot related data, differs per game. Empty if not required. |
| slot_info | dict\[int, NetworkSlot\] | maps each slot to a NetworkSlot information |
### ReceivedItems
Sent to clients when they receive an item.
@ -262,6 +263,7 @@ Sent to the server to inform it of locations the client has seen, but not checke
| Name | Type | Notes |
| ---- | ---- | ----- |
| locations | list\[int\] | The ids of the locations seen by the client. May contain any number of locations, even ones sent before; duplicates do not cause issues with the Archipelago server. |
| create_as_hint | bool | If True, the scouted locations get created and broadcasted as a player-visible hint. |
### StatusUpdate
Sent to the server to update on the sender's status. Examples include readiness or goal completion. (Example: defeated Ganon in A Link to the Past)
@ -445,6 +447,30 @@ class Version(NamedTuple):
build: int
```
### SlotType
An enum representing the nature of a slot.
```python
import enum
class SlotType(enum.IntFlag):
spectator = 0b00
player = 0b01
group = 0b10
```
### NetworkSlot
An object representing static information about a slot.
```python
import typing
from NetUtils import SlotType
class NetworkSlot(typing.NamedTuple):
name: str
game: str
type: SlotType
group_members: typing.List[int] = [] # only populated if type == group
```
### Permission
An enumeration containing the possible command permission, for commands that may be restricted.
```python