From 5aad9d9e9e47b39bc3ced11851c54da35c2b1697 Mon Sep 17 00:00:00 2001 From: qwint Date: Wed, 25 Sep 2024 11:46:24 -0400 Subject: [PATCH 1/2] use base collect/remove for item link groups --- BaseClasses.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseClasses.py b/BaseClasses.py index a5de1689a7f..7774db81bfb 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -195,6 +195,8 @@ def add_group(self, name: str, game: str, players: AbstractSet[int] = frozenset( world_type = AutoWorld.AutoWorldRegister.world_types[game] self.worlds[new_id] = world_type.create_group(self, new_id, players) self.worlds[new_id].collect_item = classmethod(AutoWorld.World.collect_item).__get__(self.worlds[new_id]) + self.worlds[new_id].collect = classmethod(AutoWorld.World.collect).__get__(self.worlds[new_id]) + self.worlds[new_id].remove = classmethod(AutoWorld.World.remove).__get__(self.worlds[new_id]) self.player_name[new_id] = name new_group = self.groups[new_id] = Group(name=name, game=game, players=players, From 7e88a838e5bb1ef91595a57bffe83f2ca7072ea8 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:02:17 +0200 Subject: [PATCH 2/2] Update BaseClasses.py --- BaseClasses.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 7774db81bfb..200e23efce5 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -194,9 +194,9 @@ def add_group(self, name: str, game: str, players: AbstractSet[int] = frozenset( self.player_types[new_id] = NetUtils.SlotType.group world_type = AutoWorld.AutoWorldRegister.world_types[game] self.worlds[new_id] = world_type.create_group(self, new_id, players) - self.worlds[new_id].collect_item = classmethod(AutoWorld.World.collect_item).__get__(self.worlds[new_id]) - self.worlds[new_id].collect = classmethod(AutoWorld.World.collect).__get__(self.worlds[new_id]) - self.worlds[new_id].remove = classmethod(AutoWorld.World.remove).__get__(self.worlds[new_id]) + self.worlds[new_id].collect_item = AutoWorld.World.collect_item.__get__(self.worlds[new_id]) + self.worlds[new_id].collect = AutoWorld.World.collect.__get__(self.worlds[new_id]) + self.worlds[new_id].remove = AutoWorld.World.remove.__get__(self.worlds[new_id]) self.player_name[new_id] = name new_group = self.groups[new_id] = Group(name=name, game=game, players=players,