LttP: fix shop inventory corruption in upgrade fairy
This commit is contained in:
parent
8597b04c41
commit
60b80083e0
|
@ -460,10 +460,11 @@ def shuffle_shops(world, items, player: int):
|
||||||
f"Not all upgrades put into Player{player}' item pool. Putting remaining items in Capacity Upgrade shop instead.")
|
f"Not all upgrades put into Player{player}' item pool. Putting remaining items in Capacity Upgrade shop instead.")
|
||||||
bombupgrades = sum(1 for item in new_items if 'Bomb Upgrade' in item)
|
bombupgrades = sum(1 for item in new_items if 'Bomb Upgrade' in item)
|
||||||
arrowupgrades = sum(1 for item in new_items if 'Arrow Upgrade' in item)
|
arrowupgrades = sum(1 for item in new_items if 'Arrow Upgrade' in item)
|
||||||
|
slots = iter(range(2))
|
||||||
if bombupgrades:
|
if bombupgrades:
|
||||||
capacityshop.add_inventory(1, 'Bomb Upgrade (+5)', 100, bombupgrades)
|
capacityshop.add_inventory(next(slots), 'Bomb Upgrade (+5)', 100, bombupgrades)
|
||||||
if arrowupgrades:
|
if arrowupgrades:
|
||||||
capacityshop.add_inventory(1, 'Arrow Upgrade (+5)', 100, arrowupgrades)
|
capacityshop.add_inventory(next(slots), 'Arrow Upgrade (+5)', 100, arrowupgrades)
|
||||||
else:
|
else:
|
||||||
for item in new_items:
|
for item in new_items:
|
||||||
world.push_precollected(ItemFactory(item, player))
|
world.push_precollected(ItemFactory(item, player))
|
||||||
|
|
Loading…
Reference in New Issue