Core: move multiple Item properties into a single Flag (#638)

This commit is contained in:
Fabian Dill
2022-06-17 03:23:27 +02:00
committed by GitHub
parent 5be00e28dd
commit 6c525e1fe6
45 changed files with 559 additions and 493 deletions

View File

@@ -1,6 +1,6 @@
import typing
from BaseClasses import Item, MultiWorld, Tutorial
from BaseClasses import Item, ItemClassification, Tutorial
from .Items import LegacyItem, ItemData, item_table, vendors_table, static_classes_table, progressive_classes_table, \
skill_unlocks_table, blueprints_table, runes_table, misc_items_table
from .Locations import LegacyLocation, location_table, base_location_table
@@ -169,7 +169,7 @@ class LegacyWorld(World):
def create_item(self, name: str) -> Item:
data = item_table[name]
return LegacyItem(name, data.progression, data.code, self.player)
return LegacyItem(name, ItemClassification.progression if data.progression else ItemClassification.filler, data.code, self.player)
def set_rules(self):
set_rules(self.world, self.player)