mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Stardew Valley: Update Mod Content (#4416)
This commit is contained in:
@@ -110,6 +110,8 @@ class LocationTags(enum.Enum):
|
||||
MAGIC_LEVEL = enum.auto()
|
||||
ARCHAEOLOGY_LEVEL = enum.auto()
|
||||
|
||||
DEPRECATED = enum.auto()
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LocationData:
|
||||
@@ -519,6 +521,10 @@ def create_locations(location_collector: StardewLocationCollector,
|
||||
location_collector(location_data.name, location_data.code, location_data.region)
|
||||
|
||||
|
||||
def filter_deprecated_locations(locations: Iterable[LocationData]) -> Iterable[LocationData]:
|
||||
return [location for location in locations if LocationTags.DEPRECATED not in location.tags]
|
||||
|
||||
|
||||
def filter_farm_type(options: StardewValleyOptions, locations: Iterable[LocationData]) -> Iterable[LocationData]:
|
||||
# On Meadowlands, "Feeding Animals" replaces "Raising Animals"
|
||||
if options.farm_type == FarmType.option_meadowlands:
|
||||
@@ -549,7 +555,8 @@ def filter_modded_locations(options: StardewValleyOptions, locations: Iterable[L
|
||||
|
||||
|
||||
def filter_disabled_locations(options: StardewValleyOptions, content: StardewContent, locations: Iterable[LocationData]) -> Iterable[LocationData]:
|
||||
locations_farm_filter = filter_farm_type(options, locations)
|
||||
locations_deprecated_filter = filter_deprecated_locations(locations)
|
||||
locations_farm_filter = filter_farm_type(options, locations_deprecated_filter)
|
||||
locations_island_filter = filter_ginger_island(options, locations_farm_filter)
|
||||
locations_qi_filter = filter_qi_order_locations(options, locations_island_filter)
|
||||
locations_masteries_filter = filter_masteries_locations(content, locations_qi_filter)
|
||||
|
||||
Reference in New Issue
Block a user