mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Core: move multiple Item properties into a single Flag (#638)
This commit is contained in:
@@ -1,16 +1,9 @@
|
||||
import os
|
||||
import json
|
||||
from base64 import b64encode, b64decode
|
||||
from math import ceil
|
||||
|
||||
from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification, RegionType
|
||||
from .Items import ChecksFinderItem, item_table, required_items
|
||||
from .Locations import ChecksFinderAdvancement, advancement_table, exclusion_table
|
||||
from .Options import checksfinder_options
|
||||
from .Regions import checksfinder_regions, link_checksfinder_structures
|
||||
from .Rules import set_rules, set_completion_rules
|
||||
from worlds.generic.Rules import exclusion_rules
|
||||
|
||||
from BaseClasses import Region, Entrance, Item, Tutorial
|
||||
from .Options import checksfinder_options
|
||||
from ..AutoWorld import World, WebWorld
|
||||
|
||||
client_version = 7
|
||||
@@ -68,9 +61,6 @@ class ChecksFinderWorld(World):
|
||||
# Convert itempool into real items
|
||||
itempool = [item for item in map(lambda name: self.create_item(name), itempool)]
|
||||
|
||||
# Choose locations to automatically exclude based on settings
|
||||
exclusion_pool = set()
|
||||
|
||||
self.world.itempool += itempool
|
||||
|
||||
def set_rules(self):
|
||||
@@ -79,7 +69,7 @@ class ChecksFinderWorld(World):
|
||||
|
||||
def create_regions(self):
|
||||
def ChecksFinderRegion(region_name: str, exits=[]):
|
||||
ret = Region(region_name, None, region_name, self.player, self.world)
|
||||
ret = Region(region_name, RegionType.Generic, region_name, self.player, self.world)
|
||||
ret.locations = [ChecksFinderAdvancement(self.player, loc_name, loc_data.id, ret)
|
||||
for loc_name, loc_data in advancement_table.items()
|
||||
if loc_data.region == region_name]
|
||||
@@ -100,5 +90,7 @@ class ChecksFinderWorld(World):
|
||||
|
||||
def create_item(self, name: str) -> Item:
|
||||
item_data = item_table[name]
|
||||
item = ChecksFinderItem(name, item_data.progression, item_data.code, self.player)
|
||||
item = ChecksFinderItem(name,
|
||||
ItemClassification.progression if item_data.progression else ItemClassification.filler,
|
||||
item_data.code, self.player)
|
||||
return item
|
||||
|
Reference in New Issue
Block a user