2024-03-15 12:05:14 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from typing import TypeVar, Generic, Dict, Collection
|
|
|
|
|
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
2024-07-07 13:04:25 +00:00
|
|
|
from ..content.game_content import StardewContent
|
2024-03-15 12:05:14 +00:00
|
|
|
from ..options import StardewValleyOptions
|
|
|
|
from ..stardew_rule import StardewRule
|
|
|
|
|
|
|
|
|
|
|
|
class LogicRegistry:
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
self.item_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] = {}
|
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
2024-07-07 13:04:25 +00:00
|
|
|
self.artisan_good_rules: Dict[str, StardewRule] = {}
|
2024-03-15 12:05:14 +00:00
|
|
|
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
|
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
2024-07-07 13:04:25 +00:00
|
|
|
content: StardewContent
|
2024-03-15 12:05:14 +00:00
|
|
|
regions: Collection[str]
|
|
|
|
logic: T
|
|
|
|
|
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
2024-07-07 13:04:25 +00:00
|
|
|
def __init__(self, player: int, registry: LogicRegistry, options: StardewValleyOptions, content: StardewContent, regions: Collection[str], logic: T):
|
|
|
|
super().__init__(player, registry, options, content, regions, logic)
|
2024-03-15 12:05:14 +00:00
|
|
|
self.player = player
|
|
|
|
self.registry = registry
|
|
|
|
self.options = options
|
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
2024-07-07 13:04:25 +00:00
|
|
|
self.content = content
|
2024-03-15 12:05:14 +00:00
|
|
|
self.regions = regions
|
|
|
|
self.logic = logic
|