LttP: fix multithreading racing condition resulting in Ganon giving the wrong prog bow hint, also have one less world.find_items() which is quite cpu expensive

This commit is contained in:
Fabian Dill
2021-09-20 01:00:09 +02:00
parent 061cc69a6a
commit 111e11924f
3 changed files with 24 additions and 22 deletions

View File

@@ -354,6 +354,12 @@ def generate_itempool(world):
world.get_location(location, player).place_locked_item(ItemFactory(item, player))
items = ItemFactory(pool, player)
# convert one Progressive Bow into Progressive Bow (Alt), in ID only, for ganon silvers hint text
if world.worlds[player].has_progressive_bows:
for item in items:
if item.code == 0x64: # Progressive Bow
item.code = 0x65 # Progressive Bow (Alt)
break
if clock_mode is not None:
world.clock_mode[player] = clock_mode
@@ -584,6 +590,7 @@ def get_pool_core(world, player: int):
if want_progressives(world.random):
pool.extend(diff.progressivebow)
world.worlds[player].has_progressive_bows = True
elif (swordless or logic == 'noglitches') and goal != 'icerodhunt':
swordless_bows = ['Bow', 'Silver Bow']
if difficulty == "easy":