Zillion: fix invalid slot data from race condition

This commit is contained in:
beauxq
2022-12-09 17:54:29 -08:00
committed by Fabian Dill
parent c3fe341736
commit b7d46004e2
3 changed files with 14 additions and 1 deletions

View File

@@ -251,7 +251,10 @@ class World(metaclass=AutoWorldRegister):
def fill_slot_data(self) -> Dict[str, Any]: # json of WebHostLib.models.Slot
"""Fill in the `slot_data` field in the `Connected` network package.
This is a way the generator can give custom data to the client.
The client will receive this as JSON in the `Connected` response."""
The client will receive this as JSON in the `Connected` response.
The generation does not wait for `generate_output` to complete before calling this.
`threading.Event` can be used if you need to wait for something from `generate_output`."""
return {}
def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]):