Skip to content

Commit

Permalink
update docs with NetworkSlot and create_as_hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 committed Feb 18, 2022
1 parent 731eef8 commit 840e634
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
26 changes: 26 additions & 0 deletions docs/network protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 840e634

Please sign in to comment.