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

@@ -13,12 +13,11 @@ from .skill_logic import SkillLogicMixin
from .special_order_logic import SpecialOrderLogicMixin
from .. import options
from ..data.craftable_data import CraftingRecipe, all_crafting_recipes_by_name
from ..data.recipe_data import StarterSource, ShopSource, SkillSource, FriendshipSource
from ..data.recipe_source import CutsceneSource, ShopTradeSource, ArchipelagoSource, LogicSource, SpecialOrderSource, \
FestivalShopSource, QuestSource
FestivalShopSource, QuestSource, StarterSource, ShopSource, SkillSource, MasterySource, FriendshipSource
from ..locations import locations_by_tag, LocationTags
from ..options import Craftsanity, SpecialOrderLocations, ExcludeGingerIsland
from ..stardew_rule import StardewRule, True_, False_, And
from ..options import Craftsanity, SpecialOrderLocations, ExcludeGingerIsland, SkillProgression
from ..stardew_rule import StardewRule, True_, False_
from ..strings.region_names import Region
@@ -58,7 +57,7 @@ SkillLogicMixin, SpecialOrderLogicMixin, CraftingLogicMixin, QuestLogicMixin]]):
if isinstance(recipe.source, StarterSource) or isinstance(recipe.source, ShopTradeSource) or isinstance(
recipe.source, ShopSource):
return self.logic.crafting.received_recipe(recipe.item)
if isinstance(recipe.source, SpecialOrderSource) and self.options.special_order_locations != SpecialOrderLocations.option_disabled:
if isinstance(recipe.source, SpecialOrderSource) and self.options.special_order_locations & SpecialOrderLocations.option_board:
return self.logic.crafting.received_recipe(recipe.item)
return self.logic.crafting.can_learn_recipe(recipe)
@@ -74,6 +73,8 @@ SkillLogicMixin, SpecialOrderLogicMixin, CraftingLogicMixin, QuestLogicMixin]]):
return self.logic.money.can_spend_at(recipe.source.region, recipe.source.price)
if isinstance(recipe.source, SkillSource):
return self.logic.skill.has_level(recipe.source.skill, recipe.source.level)
if isinstance(recipe.source, MasterySource):
return self.logic.skill.has_mastery(recipe.source.skill)
if isinstance(recipe.source, CutsceneSource):
return self.logic.region.can_reach(recipe.source.region) & self.logic.relationship.has_hearts(recipe.source.friend, recipe.source.hearts)
if isinstance(recipe.source, FriendshipSource):
@@ -81,9 +82,9 @@ SkillLogicMixin, SpecialOrderLogicMixin, CraftingLogicMixin, QuestLogicMixin]]):
if isinstance(recipe.source, QuestSource):
return self.logic.quest.can_complete_quest(recipe.source.quest)
if isinstance(recipe.source, SpecialOrderSource):
if self.options.special_order_locations == SpecialOrderLocations.option_disabled:
return self.logic.special_order.can_complete_special_order(recipe.source.special_order)
return self.logic.crafting.received_recipe(recipe.item)
if self.options.special_order_locations & SpecialOrderLocations.option_board:
return self.logic.crafting.received_recipe(recipe.item)
return self.logic.special_order.can_complete_special_order(recipe.source.special_order)
if isinstance(recipe.source, LogicSource):
if recipe.source.logic_rule == "Cellar":
return self.logic.region.can_reach(Region.cellar)
@@ -99,13 +100,16 @@ SkillLogicMixin, SpecialOrderLogicMixin, CraftingLogicMixin, QuestLogicMixin]]):
craftsanity_prefix = "Craft "
all_recipes_names = []
exclude_island = self.options.exclude_ginger_island == ExcludeGingerIsland.option_true
exclude_masteries = self.options.skill_progression != SkillProgression.option_progressive_with_masteries
for location in locations_by_tag[LocationTags.CRAFTSANITY]:
if not location.name.startswith(craftsanity_prefix):
continue
if exclude_island and LocationTags.GINGER_ISLAND in location.tags:
continue
if exclude_masteries and LocationTags.REQUIRES_MASTERIES in location.tags:
continue
if location.mod_name and location.mod_name not in self.options.mods:
continue
all_recipes_names.append(location.name[len(craftsanity_prefix):])
all_recipes = [all_crafting_recipes_by_name[recipe_name] for recipe_name in all_recipes_names]
return And(*(self.logic.crafting.can_craft(recipe) for recipe in all_recipes))
return self.logic.and_(*(self.logic.crafting.can_craft(recipe) for recipe in all_recipes))