From 75463193ab9cc806eb1d7f2d4c3d37dcd9e636b6 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 20 Jul 2023 01:20:59 +0200 Subject: [PATCH] Witness: Yeah let's not sort the entire multiworld's itempool lol (#1993) * Witness: Yeah let's not sort the entire multiworld's itempool lol * Non-stupid dict sorting Co-authored-by: el-u <109771707+el-u@users.noreply.github.com> * Even less stupid dict sorting Co-authored-by: el-u <109771707+el-u@users.noreply.github.com> --------- Co-authored-by: el-u <109771707+el-u@users.noreply.github.com> --- worlds/witness/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/worlds/witness/__init__.py b/worlds/witness/__init__.py index 1c73d595..6d6407d1 100644 --- a/worlds/witness/__init__.py +++ b/worlds/witness/__init__.py @@ -178,14 +178,11 @@ class WitnessWorld(World): item_pool[random_early_item] -= 1 # Generate the actual items. - for item_name, quantity in item_pool.items(): + for item_name, quantity in sorted(item_pool.items()): self.multiworld.itempool += [self.create_item(item_name) for _ in range(0, quantity)] if self.items.item_data[item_name].local_only: self.multiworld.local_items[self.player].value.add(item_name) - # Sort the output for consistency across versions if the implementation changes but the logic does not. - self.multiworld.itempool = sorted(self.multiworld.itempool, key=lambda item: item.name) - def set_rules(self): set_rules(self.multiworld, self.player, self.player_logic, self.locat)