Greatly improved performance when no locations are excluded

This commit is contained in:
Jarno Westhof 2021-10-10 14:23:06 +02:00 committed by Fabian Dill
parent 952d878442
commit e301b67e49
1 changed files with 3 additions and 1 deletions

View File

@ -144,7 +144,9 @@ def create_item_with_correct_settings(world: MultiWorld, player: int, name: str)
data = item_table[name]
item = Item(name, data.progression, data.code, player)
item.never_exclude = data.never_exclude
if world.exclude_locations[player]: # Doubles performance to not set item exclusion when its not required
item.never_exclude = data.never_exclude
if not item.advancement:
return item