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,26 +1,32 @@
from typing import Optional
from BaseClasses import ItemClassification
from .base_logic import BaseLogic, BaseLogicMixin
from .has_logic import HasLogicMixin
from ..stardew_rule import StardewRule, Received, And, Or, TotalReceived
from .logic_event import all_events
from ..items import item_table
from ..stardew_rule import StardewRule, Received, TotalReceived
class ReceivedLogicMixin(BaseLogic[HasLogicMixin], BaseLogicMixin):
# Should be cached
def received(self, item: str, count: Optional[int] = 1) -> StardewRule:
assert count >= 0, "Can't receive a negative amount of item."
if item in all_events:
return Received(item, self.player, count, event=True)
assert item_table[item].classification & ItemClassification.progression, f"Item [{item_table[item].name}] has to be progression to be used in logic"
return Received(item, self.player, count)
def received_all(self, *items: str):
assert items, "Can't receive all of no items."
return And(*(self.received(item) for item in items))
return self.logic.and_(*(self.received(item) for item in items))
def received_any(self, *items: str):
assert items, "Can't receive any of no items."
return Or(*(self.received(item) for item in items))
return self.logic.or_(*(self.received(item) for item in items))
def received_once(self, *items: str, count: int):
assert items, "Can't receive once of no items."
@@ -32,4 +38,7 @@ class ReceivedLogicMixin(BaseLogic[HasLogicMixin], BaseLogicMixin):
assert items, "Can't receive n of no items."
assert count >= 0, "Can't receive a negative amount of item."
for item in items:
assert item_table[item].classification & ItemClassification.progression, f"Item [{item_table[item].name}] has to be progression to be used in logic"
return TotalReceived(count, items, self.player)