mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00

Major Content update for Stardew Valley, including the following features - Major performance improvements all across the Stardew Valley apworld, including a significant reduction in the test time - Randomized Farm Type - Bundles rework (Remixed Bundles and Missing Bundle!) - New Settings: * Shipsanity - Shipping individual items * Monstersanity - Slaying monsters * Cooksanity - Cooking individual recipes * Chefsanity - Learning individual recipes * Craftsanity - Crafting individual items - New Goals: * Protector of the Valley - Complete every monster slayer goal * Full Shipment - Ship every item * Craftmaster - Craft every item * Gourmet Chef - Cook every recipe * Legend - Earn 10 000 000g * Mystery of the Stardrops - Find every stardrop (Maguffin Hunt) * Allsanity - Complete every check in your slot - Building Shuffle: Cheaper options - Tool Shuffle: Cheaper options - Money rework - New traps - New isolated checks and items, including the farm cave, the movie theater, etc - Mod Support: SVE [Albrekka] - Mod Support: Distant Lands [Albrekka] - Mod Support: Hat Mouse Lacey [Albrekka] - Mod Support: Boarding House [Albrekka] Co-authored-by: Witchybun <elnendil@gmail.com> Co-authored-by: Witchybun <96719127+Witchybun@users.noreply.github.com> Co-authored-by: Jouramie <jouramie@hotmail.com> Co-authored-by: Alchav <59858495+Alchav@users.noreply.github.com>
51 lines
1.6 KiB
Python
51 lines
1.6 KiB
Python
from __future__ import annotations
|
|
|
|
from typing import TypeVar, Generic, Dict, Collection
|
|
|
|
from ..options import StardewValleyOptions
|
|
from ..stardew_rule import StardewRule
|
|
|
|
|
|
class LogicRegistry:
|
|
|
|
def __init__(self):
|
|
self.item_rules: Dict[str, StardewRule] = {}
|
|
self.sapling_rules: Dict[str, StardewRule] = {}
|
|
self.tree_fruit_rules: Dict[str, StardewRule] = {}
|
|
self.seed_rules: Dict[str, StardewRule] = {}
|
|
self.cooking_rules: Dict[str, StardewRule] = {}
|
|
self.crafting_rules: Dict[str, StardewRule] = {}
|
|
self.crop_rules: Dict[str, StardewRule] = {}
|
|
self.fish_rules: Dict[str, StardewRule] = {}
|
|
self.museum_rules: Dict[str, StardewRule] = {}
|
|
self.festival_rules: Dict[str, StardewRule] = {}
|
|
self.quest_rules: Dict[str, StardewRule] = {}
|
|
self.building_rules: Dict[str, StardewRule] = {}
|
|
self.special_order_rules: Dict[str, StardewRule] = {}
|
|
|
|
self.sve_location_rules: Dict[str, StardewRule] = {}
|
|
|
|
|
|
class BaseLogicMixin:
|
|
def __init__(self, *args, **kwargs):
|
|
pass
|
|
|
|
|
|
T = TypeVar("T", bound=BaseLogicMixin)
|
|
|
|
|
|
class BaseLogic(BaseLogicMixin, Generic[T]):
|
|
player: int
|
|
registry: LogicRegistry
|
|
options: StardewValleyOptions
|
|
regions: Collection[str]
|
|
logic: T
|
|
|
|
def __init__(self, player: int, registry: LogicRegistry, options: StardewValleyOptions, regions: Collection[str], logic: T):
|
|
super().__init__(player, registry, options, regions, logic)
|
|
self.player = player
|
|
self.registry = registry
|
|
self.options = options
|
|
self.regions = regions
|
|
self.logic = logic
|