mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-07 15:13:52 -08:00
Noita: Fix filling Shop Item locations without updating item.location (#5840)
In single-player multiworlds with small item pools, Noita was manually placing some items into Shop Item locations, but was only setting location.item, and not also setting item.location so that the item and location refer to one another. This has been fixed by using the MultiWorld.push_item() helper method to place the items instead of manually placing the items.
This commit is contained in:
@@ -79,7 +79,7 @@ def create_all_items(world: NoitaWorld) -> None:
|
||||
if world.multiworld.players == 1:
|
||||
for location in world.multiworld.get_unfilled_locations(player):
|
||||
if "Shop Item" in location.name:
|
||||
location.item = create_item(player, itempool.pop())
|
||||
world.multiworld.push_item(location, create_item(player, itempool.pop()), False)
|
||||
locations_to_fill = len(world.multiworld.get_unfilled_locations(player))
|
||||
|
||||
itempool += create_random_items(world, filler_weights, locations_to_fill - len(itempool))
|
||||
|
||||
Reference in New Issue
Block a user