From c3fe341736a1e5de302fdc408ace6ef3bf2cef45 Mon Sep 17 00:00:00 2001 From: Jarno Date: Fri, 9 Dec 2022 10:24:08 +0100 Subject: [PATCH] Docs: slot_data typing (#1300) * Docs: slot_data typing * Properly escaped brackets [ ] --- docs/network protocol.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/network protocol.md b/docs/network protocol.md index 5b574a0d..09990c96 100644 --- a/docs/network protocol.md +++ b/docs/network protocol.md @@ -128,7 +128,7 @@ Sent to clients when the connection handshake is successfully completed. | players | list\[[NetworkPlayer](#NetworkPlayer)\] | List denoting other players in the multiworld, whether connected or not. | | 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 ± 253-1. | -| slot_data | dict | Contains a json object for slot related data, differs per game. Empty if not required. Not present if slot_data in [Connect](#Connect) is false. | +| slot_data | dict\[str, any\] | Contains a json object for slot related data, differs per game. Empty if not required. Not present if slot_data in [Connect](#Connect) is false. | | slot_info | dict\[int, [NetworkSlot](#NetworkSlot)\] | maps each slot to a [NetworkSlot](#NetworkSlot) information | ### ReceivedItems @@ -370,12 +370,11 @@ Additional arguments sent in this package will also be added to the [Retrieved]( Some special keys exist with specific return data, all of them have the prefix `_read_`, so `hints_{team}_{slot}` is `_read_hints_{team}_{slot}`. -| Name | Type | Notes | -|-------------------------------|------------------------|---------------------------------------------------| -| hints_{team}_{slot} | list\[[Hint](#Hint)\] | All Hints belonging to the requested Player. | -| slot_data_{slot} | any | slot_data belonging to the requested slot. | -| item_name_groups_{game_name} | dict\[str, list\[str]] | item_name_groups belonging to the requested game. | - +| Name | Type | Notes | +|-------------------------------|--------------------------|---------------------------------------------------| +| hints_{team}_{slot} | list\[[Hint](#Hint)\] | All Hints belonging to the requested Player. | +| slot_data_{slot} | dict\[str, any\] | slot_data belonging to the requested slot. | +| item_name_groups_{game_name} | dict\[str, list\[str\]\] | item_name_groups belonging to the requested game. | ### Set Used to write data to the server's data storage, that data can then be shared across worlds or just saved for later. Values for keys in the data storage can be retrieved with a [Get](#Get) package, or monitored with a [SetNotify](#SetNotify) package.