mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024 This includes randomization for pretty much all of the new content, including but not limited to - Raccoon Bundles - Booksanity - Skill Masteries - New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit. In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update - Walnutsanity - Player Buffs - More customizability in settings, such as shorter special orders, ER without farmhouse - New Remixed Bundles
This commit is contained in:
33
worlds/stardew_valley/logic/logic_event.py
Normal file
33
worlds/stardew_valley/logic/logic_event.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
from ..strings.ap_names import event_names
|
||||
from ..strings.metal_names import MetalBar, Ore
|
||||
from ..strings.region_names import Region
|
||||
|
||||
all_events = event_names.all_events.copy()
|
||||
all_logic_events = list()
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LogicEvent:
|
||||
name: str
|
||||
region: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LogicItemEvent(LogicEvent):
|
||||
item: str
|
||||
|
||||
def __init__(self, item: str, region: str):
|
||||
super().__init__(f"{item} (Logic event)", region)
|
||||
super().__setattr__("item", item)
|
||||
|
||||
|
||||
def register_item_event(item: str, region: str = Region.farm):
|
||||
event = LogicItemEvent(item, region)
|
||||
all_logic_events.append(event)
|
||||
all_events.add(event.name)
|
||||
|
||||
|
||||
for i in (MetalBar.copper, MetalBar.iron, MetalBar.gold, MetalBar.iridium, Ore.copper, Ore.iron, Ore.gold, Ore.iridium):
|
||||
register_item_event(i)
|
||||
Reference in New Issue
Block a user