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:
agilbert1412
2024-07-07 16:04:25 +03:00
committed by GitHub
parent f99ee77325
commit 9b22458f44
210 changed files with 10298 additions and 4540 deletions

View File

@@ -1,11 +1,13 @@
from functools import cached_property
from typing import Iterable, Union
from Utils import cache_self1
from .base_logic import BaseLogic, BaseLogicMixin
from .has_logic import HasLogicMixin
from .received_logic import ReceivedLogicMixin
from .time_logic import TimeLogicMixin
from ..options import SeasonRandomization
from ..stardew_rule import StardewRule, True_, Or, And
from ..stardew_rule import StardewRule, True_, true_
from ..strings.generic_names import Generic
from ..strings.season_names import Season
@@ -16,7 +18,23 @@ class SeasonLogicMixin(BaseLogicMixin):
self.season = SeasonLogic(*args, **kwargs)
class SeasonLogic(BaseLogic[Union[SeasonLogicMixin, TimeLogicMixin, ReceivedLogicMixin]]):
class SeasonLogic(BaseLogic[Union[HasLogicMixin, SeasonLogicMixin, TimeLogicMixin, ReceivedLogicMixin]]):
@cached_property
def has_spring(self) -> StardewRule:
return self.logic.season.has(Season.spring)
@cached_property
def has_summer(self) -> StardewRule:
return self.logic.season.has(Season.summer)
@cached_property
def has_fall(self) -> StardewRule:
return self.logic.season.has(Season.fall)
@cached_property
def has_winter(self) -> StardewRule:
return self.logic.season.has(Season.winter)
@cache_self1
def has(self, season: str) -> StardewRule:
@@ -32,13 +50,16 @@ class SeasonLogic(BaseLogic[Union[SeasonLogicMixin, TimeLogicMixin, ReceivedLogi
return self.logic.received(season)
def has_any(self, seasons: Iterable[str]):
if seasons == Season.all:
return true_
if not seasons:
# That should be false, but I'm scared.
return True_()
return Or(*(self.logic.season.has(season) for season in seasons))
return self.logic.or_(*(self.logic.season.has(season) for season in seasons))
def has_any_not_winter(self):
return self.logic.season.has_any([Season.spring, Season.summer, Season.fall])
def has_all(self):
seasons = [Season.spring, Season.summer, Season.fall, Season.winter]
return And(*(self.logic.season.has(season) for season in seasons))
return self.logic.and_(*(self.logic.season.has(season) for season in seasons))