From 449f4ee92fee948a2a0bd47a94e8584539a7eab2 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 7 Nov 2021 15:56:43 +0100 Subject: [PATCH] SoE: apply cut slot name to multidata --- worlds/soe/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/worlds/soe/__init__.py b/worlds/soe/__init__.py index 42b74fdb..7e554356 100644 --- a/worlds/soe/__init__.py +++ b/worlds/soe/__init__.py @@ -102,6 +102,7 @@ class SoEWorld(World): evermizer_seed: int restrict_item_placement: bool = False # placeholder to force certain item types to certain pools + connect_name: str def __init__(self, *args, **kwargs): self.connect_name_available_event = threading.Event() @@ -227,6 +228,16 @@ class SoEWorld(World): except: pass + def modify_multidata(self, multidata: dict): + # wait for self.connect_name to be available. + self.connect_name_available_event.wait() + # we skip in case of error, so that the original error in the output thread is the one that gets raised + if self.connect_name and self.connect_name != self.world.player_name[self.player]: + payload = multidata["connect_names"][self.world.player_name[self.player]] + multidata["connect_names"][self.connect_name] = payload + del (multidata["connect_names"][self.world.player_name[self.player]]) + + class SoEItem(Item): game: str = "Secret of Evermore"