Add priority attribute to items. They are placed after advancement items, but before the rest. Ensures they are available even in seeds that overfill the itempool.

This commit is contained in:
LLCoolDave
2017-06-04 14:43:13 +02:00
parent fd158e332f
commit 4ed2a5b510
4 changed files with 140 additions and 145 deletions

View File

@@ -165,13 +165,13 @@ def copy_world(world):
# fill locations
for location in world.get_locations():
if location.item is not None:
item = Item(location.item.name, location.item.advancement, location.item.key)
item = Item(location.item.name, location.item.advancement, location.item.priority, location.item.key)
ret.get_location(location.name).item = item
item.location = ret.get_location(location.name)
# copy remaining itempool. No item in itempool should have an assigned location
for item in world.itempool:
ret.itempool.append(Item(item.name, item.advancement, item.key))
ret.itempool.append(Item(item.name, item.advancement, item.priority, item.key))
# copy progress items in state
ret.state.prog_items = list(world.state.prog_items)