Race flag on GUI

Async Doors League presets
Take into account starting inventory with default item pool
This commit is contained in:
aerinon
2023-01-06 13:56:18 -07:00
parent c2da20207b
commit 8839926a97
13 changed files with 134 additions and 19 deletions

View File

@@ -962,9 +962,26 @@ def get_pool_core(world, player, progressive, shuffle, difficulty, treasure_hunt
pool.extend(['Small Key (Universal)'])
else:
pool.extend(['Small Key (Universal)'])
modify_pool_for_start_inventory(pool, world, player)
return (pool, placed_items, precollected_items, clock_mode, lamps_needed_for_dark_rooms)
def modify_pool_for_start_inventory(pool, world, player):
for item in world.precollected_items:
if item.player == player:
pool.remove(item.name)
if item.dungeon:
d = world.get_dungeon(item.dungeon, item.player)
match = next((i for i in d.all_items if i.name == item.name), None)
if match:
if match.map or match.compass:
d.dungeon_items.remove(match)
elif match.smallkey:
d.small_keys.remove(match)
elif match.bigkey:
d.big_key.remove(match)
def make_custom_item_pool(world, player, progressive, shuffle, difficulty, timer, goal, mode, swords, bombbag, customitemarray):
if isinstance(customitemarray,dict) and 1 in customitemarray:
customitemarray = customitemarray[1]