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>
This commit is contained in:
parent
257774c31b
commit
75463193ab
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue