Stardew Valley: Update Mod Content (#4416)

This commit is contained in:
agilbert1412 2025-01-14 12:47:12 -05:00 committed by GitHub
parent dae9d4c575
commit 79e6beeec3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 52 additions and 16 deletions

View File

@ -11,7 +11,7 @@ from ..strings.craftable_names import Bomb, Fence, Sprinkler, WildSeeds, Floor,
from ..strings.crop_names import Fruit, Vegetable from ..strings.crop_names import Fruit, Vegetable
from ..strings.currency_names import Currency from ..strings.currency_names import Currency
from ..strings.fertilizer_names import Fertilizer, RetainingSoil, SpeedGro from ..strings.fertilizer_names import Fertilizer, RetainingSoil, SpeedGro
from ..strings.fish_names import Fish, WaterItem, ModTrash from ..strings.fish_names import Fish, WaterItem, ModTrash, Trash
from ..strings.flower_names import Flower from ..strings.flower_names import Flower
from ..strings.food_names import Meal from ..strings.food_names import Meal
from ..strings.forageable_names import Forageable, SVEForage, DistantLandsForageable, Mushroom from ..strings.forageable_names import Forageable, SVEForage, DistantLandsForageable, Mushroom
@ -378,4 +378,12 @@ recycling_bin = skill_recipe(ModMachine.recycling_bin, ModSkill.binning, 7, {Met
advanced_recycling_machine = skill_recipe(ModMachine.advanced_recycling_machine, ModSkill.binning, 9, advanced_recycling_machine = skill_recipe(ModMachine.advanced_recycling_machine, ModSkill.binning, 9,
{MetalBar.iridium: 5, ArtisanGood.battery_pack: 2, MetalBar.quartz: 10}, ModNames.binning_skill) {MetalBar.iridium: 5, ArtisanGood.battery_pack: 2, MetalBar.quartz: 10}, ModNames.binning_skill)
coppper_slot_machine = skill_recipe(ModMachine.copper_slot_machine, ModSkill.luck, 2, {MetalBar.copper: 15, Material.stone: 1, Material.wood: 1,
Material.fiber: 1, Material.sap: 1, Loot.slime: 1,
Forageable.salmonberry: 1, Material.clay: 1, Trash.joja_cola: 1}, ModNames.luck_skill)
gold_slot_machine = skill_recipe(ModMachine.gold_slot_machine, ModSkill.luck, 4, {MetalBar.gold: 15, ModMachine.copper_slot_machine: 1}, ModNames.luck_skill)
iridium_slot_machine = skill_recipe(ModMachine.iridium_slot_machine, ModSkill.luck, 4, {MetalBar.iridium: 15, ModMachine.gold_slot_machine: 1}, ModNames.luck_skill)
radioactive_slot_machine = skill_recipe(ModMachine.radioactive_slot_machine, ModSkill.luck, 4, {MetalBar.radioactive: 15, ModMachine.iridium_slot_machine: 1}, ModNames.luck_skill)
all_crafting_recipes_by_name = {recipe.item: recipe for recipe in all_crafting_recipes} all_crafting_recipes_by_name = {recipe.item: recipe for recipe in all_crafting_recipes}

View File

@ -2935,6 +2935,10 @@ id,region,name,tags,mod_name
7433,Farm,Craft Composter,CRAFTSANITY,Binning Skill 7433,Farm,Craft Composter,CRAFTSANITY,Binning Skill
7434,Farm,Craft Recycling Bin,CRAFTSANITY,Binning Skill 7434,Farm,Craft Recycling Bin,CRAFTSANITY,Binning Skill
7435,Farm,Craft Advanced Recycling Machine,CRAFTSANITY,Binning Skill 7435,Farm,Craft Advanced Recycling Machine,CRAFTSANITY,Binning Skill
7440,Farm,Craft Copper Slot Machine,"CRAFTSANITY",Luck Skill
7441,Farm,Craft Gold Slot Machine,"CRAFTSANITY",Luck Skill
7442,Farm,Craft Iridium Slot Machine,"CRAFTSANITY",Luck Skill
7443,Farm,Craft Radioactive Slot Machine,"CRAFTSANITY",Luck Skill
7451,Adventurer's Guild,Magic Elixir Recipe,"CHEFSANITY,CHEFSANITY_PURCHASE",Magic 7451,Adventurer's Guild,Magic Elixir Recipe,"CHEFSANITY,CHEFSANITY_PURCHASE",Magic
7452,Adventurer's Guild,Travel Core Recipe,CRAFTSANITY,Magic 7452,Adventurer's Guild,Travel Core Recipe,CRAFTSANITY,Magic
7453,Alesia Shop,Haste Elixir Recipe,CRAFTSANITY,Stardew Valley Expanded 7453,Alesia Shop,Haste Elixir Recipe,CRAFTSANITY,Stardew Valley Expanded
@ -3241,7 +3245,7 @@ id,region,name,tags,mod_name
8199,Shipping,Shipsanity: Hardwood Display,SHIPSANITY,Archaeology 8199,Shipping,Shipsanity: Hardwood Display,SHIPSANITY,Archaeology
8200,Shipping,Shipsanity: Wooden Display,SHIPSANITY,Archaeology 8200,Shipping,Shipsanity: Wooden Display,SHIPSANITY,Archaeology
8201,Shipping,Shipsanity: Dwarf Gadget: Infinite Volcano Simulation,"SHIPSANITY,GINGER_ISLAND",Archaeology 8201,Shipping,Shipsanity: Dwarf Gadget: Infinite Volcano Simulation,"SHIPSANITY,GINGER_ISLAND",Archaeology
8202,Shipping,Shipsanity: Water Shifter,SHIPSANITY,Archaeology 8202,Shipping,Shipsanity: Water Shifter,"SHIPSANITY,DEPRECATED",Archaeology
8203,Shipping,Shipsanity: Brown Amanita,"SHIPSANITY,SHIPSANITY_FULL_SHIPMENT",Distant Lands - Witch Swamp Overhaul 8203,Shipping,Shipsanity: Brown Amanita,"SHIPSANITY,SHIPSANITY_FULL_SHIPMENT",Distant Lands - Witch Swamp Overhaul
8204,Shipping,Shipsanity: Swamp Herb,"SHIPSANITY,SHIPSANITY_FULL_SHIPMENT",Distant Lands - Witch Swamp Overhaul 8204,Shipping,Shipsanity: Swamp Herb,"SHIPSANITY,SHIPSANITY_FULL_SHIPMENT",Distant Lands - Witch Swamp Overhaul
8205,Shipping,Shipsanity: Void Mint Seeds,SHIPSANITY,Distant Lands - Witch Swamp Overhaul 8205,Shipping,Shipsanity: Void Mint Seeds,SHIPSANITY,Distant Lands - Witch Swamp Overhaul

1 id region name tags mod_name
2935 7433 Farm Craft Composter CRAFTSANITY Binning Skill
2936 7434 Farm Craft Recycling Bin CRAFTSANITY Binning Skill
2937 7435 Farm Craft Advanced Recycling Machine CRAFTSANITY Binning Skill
2938 7440 Farm Craft Copper Slot Machine CRAFTSANITY Luck Skill
2939 7441 Farm Craft Gold Slot Machine CRAFTSANITY Luck Skill
2940 7442 Farm Craft Iridium Slot Machine CRAFTSANITY Luck Skill
2941 7443 Farm Craft Radioactive Slot Machine CRAFTSANITY Luck Skill
2942 7451 Adventurer's Guild Magic Elixir Recipe CHEFSANITY,CHEFSANITY_PURCHASE Magic
2943 7452 Adventurer's Guild Travel Core Recipe CRAFTSANITY Magic
2944 7453 Alesia Shop Haste Elixir Recipe CRAFTSANITY Stardew Valley Expanded
3245 8199 Shipping Shipsanity: Hardwood Display SHIPSANITY Archaeology
3246 8200 Shipping Shipsanity: Wooden Display SHIPSANITY Archaeology
3247 8201 Shipping Shipsanity: Dwarf Gadget: Infinite Volcano Simulation SHIPSANITY,GINGER_ISLAND Archaeology
3248 8202 Shipping Shipsanity: Water Shifter SHIPSANITY SHIPSANITY,DEPRECATED Archaeology
3249 8203 Shipping Shipsanity: Brown Amanita SHIPSANITY,SHIPSANITY_FULL_SHIPMENT Distant Lands - Witch Swamp Overhaul
3250 8204 Shipping Shipsanity: Swamp Herb SHIPSANITY,SHIPSANITY_FULL_SHIPMENT Distant Lands - Witch Swamp Overhaul
3251 8205 Shipping Shipsanity: Void Mint Seeds SHIPSANITY Distant Lands - Witch Swamp Overhaul

View File

@ -110,6 +110,8 @@ class LocationTags(enum.Enum):
MAGIC_LEVEL = enum.auto() MAGIC_LEVEL = enum.auto()
ARCHAEOLOGY_LEVEL = enum.auto() ARCHAEOLOGY_LEVEL = enum.auto()
DEPRECATED = enum.auto()
@dataclass(frozen=True) @dataclass(frozen=True)
class LocationData: class LocationData:
@ -519,6 +521,10 @@ def create_locations(location_collector: StardewLocationCollector,
location_collector(location_data.name, location_data.code, location_data.region) location_collector(location_data.name, location_data.code, location_data.region)
def filter_deprecated_locations(locations: Iterable[LocationData]) -> Iterable[LocationData]:
return [location for location in locations if LocationTags.DEPRECATED not in location.tags]
def filter_farm_type(options: StardewValleyOptions, locations: Iterable[LocationData]) -> Iterable[LocationData]: def filter_farm_type(options: StardewValleyOptions, locations: Iterable[LocationData]) -> Iterable[LocationData]:
# On Meadowlands, "Feeding Animals" replaces "Raising Animals" # On Meadowlands, "Feeding Animals" replaces "Raising Animals"
if options.farm_type == FarmType.option_meadowlands: if options.farm_type == FarmType.option_meadowlands:
@ -549,7 +555,8 @@ def filter_modded_locations(options: StardewValleyOptions, locations: Iterable[L
def filter_disabled_locations(options: StardewValleyOptions, content: StardewContent, locations: Iterable[LocationData]) -> Iterable[LocationData]: def filter_disabled_locations(options: StardewValleyOptions, content: StardewContent, locations: Iterable[LocationData]) -> Iterable[LocationData]:
locations_farm_filter = filter_farm_type(options, locations) locations_deprecated_filter = filter_deprecated_locations(locations)
locations_farm_filter = filter_farm_type(options, locations_deprecated_filter)
locations_island_filter = filter_ginger_island(options, locations_farm_filter) locations_island_filter = filter_ginger_island(options, locations_farm_filter)
locations_qi_filter = filter_qi_order_locations(options, locations_island_filter) locations_qi_filter = filter_qi_order_locations(options, locations_island_filter)
locations_masteries_filter = filter_masteries_locations(content, locations_qi_filter) locations_masteries_filter = filter_masteries_locations(content, locations_qi_filter)

View File

@ -757,6 +757,14 @@ class Gifting(Toggle):
default = 1 default = 1
all_mods = {ModNames.deepwoods, ModNames.tractor, ModNames.big_backpack,
ModNames.luck_skill, ModNames.magic, ModNames.socializing_skill, ModNames.archaeology,
ModNames.cooking_skill, ModNames.binning_skill, ModNames.juna,
ModNames.jasper, ModNames.alec, ModNames.yoba, ModNames.eugene,
ModNames.wellwick, ModNames.ginger, ModNames.shiko, ModNames.delores,
ModNames.ayeisha, ModNames.riley, ModNames.skull_cavern_elevator, ModNames.sve, ModNames.distant_lands,
ModNames.alecto, ModNames.lacey, ModNames.boarding_house}
# These mods have been disabled because either they are not updated for the current supported version of Stardew Valley, # These mods have been disabled because either they are not updated for the current supported version of Stardew Valley,
# or we didn't find the time to validate that they work or fix compatibility issues if they do. # or we didn't find the time to validate that they work or fix compatibility issues if they do.
# Once a mod is validated to be functional, it can simply be removed from this list # Once a mod is validated to be functional, it can simply be removed from this list
@ -766,8 +774,7 @@ disabled_mods = {ModNames.deepwoods, ModNames.magic,
ModNames.wellwick, ModNames.shiko, ModNames.delores, ModNames.riley, ModNames.wellwick, ModNames.shiko, ModNames.delores, ModNames.riley,
ModNames.boarding_house} ModNames.boarding_house}
if 'unittest' in sys.modules.keys() or 'pytest' in sys.modules.keys(): enabled_mods = all_mods.difference(disabled_mods)
disabled_mods = {}
class Mods(OptionSet): class Mods(OptionSet):
@ -775,13 +782,11 @@ class Mods(OptionSet):
visibility = Visibility.all & ~Visibility.simple_ui visibility = Visibility.all & ~Visibility.simple_ui
internal_name = "mods" internal_name = "mods"
display_name = "Mods" display_name = "Mods"
valid_keys = {ModNames.deepwoods, ModNames.tractor, ModNames.big_backpack, valid_keys = enabled_mods
ModNames.luck_skill, ModNames.magic, ModNames.socializing_skill, ModNames.archaeology, # In tests, we keep even the disabled mods active, because we expect some of them to eventually get updated for SV 1.6
ModNames.cooking_skill, ModNames.binning_skill, ModNames.juna, # In that case, we want to maintain content and logic for them, and therefore keep testing them
ModNames.jasper, ModNames.alec, ModNames.yoba, ModNames.eugene, if 'unittest' in sys.modules.keys() or 'pytest' in sys.modules.keys():
ModNames.wellwick, ModNames.ginger, ModNames.shiko, ModNames.delores, valid_keys = all_mods
ModNames.ayeisha, ModNames.riley, ModNames.skull_cavern_elevator, ModNames.sve, ModNames.distant_lands,
ModNames.alecto, ModNames.lacey, ModNames.boarding_house}.difference(disabled_mods)
class BundlePlando(OptionSet): class BundlePlando(OptionSet):

View File

@ -201,6 +201,10 @@ class ModMachine:
composter = "Composter" composter = "Composter"
recycling_bin = "Recycling Bin" recycling_bin = "Recycling Bin"
advanced_recycling_machine = "Advanced Recycling Machine" advanced_recycling_machine = "Advanced Recycling Machine"
copper_slot_machine = "Copper Slot Machine"
gold_slot_machine = "Gold Slot Machine"
iridium_slot_machine = "Iridium Slot Machine"
radioactive_slot_machine = "Radioactive Slot Machine"
class ModFloor: class ModFloor:

View File

@ -1,5 +1,6 @@
from . import SVTestBase, allsanity_no_mods_6_x_x, \ from . import SVTestBase, allsanity_no_mods_6_x_x, \
allsanity_mods_6_x_x, minimal_locations_maximal_items, minimal_locations_maximal_items_with_island, get_minsanity_options, default_6_x_x allsanity_mods_6_x_x, minimal_locations_maximal_items, minimal_locations_maximal_items_with_island, get_minsanity_options, default_6_x_x, \
allsanity_mods_6_x_x_exclude_disabled
from .. import location_table from .. import location_table
from ..items import Group, item_table from ..items import Group, item_table
@ -70,7 +71,7 @@ class TestAllSanitySettingsHasAllExpectedLocations(SVTestBase):
options = allsanity_no_mods_6_x_x() options = allsanity_no_mods_6_x_x()
def test_allsanity_without_mods_has_at_least_locations(self): def test_allsanity_without_mods_has_at_least_locations(self):
expected_locations = 2238 expected_locations = 2256
real_locations = self.get_real_locations() real_locations = self.get_real_locations()
number_locations = len(real_locations) number_locations = len(real_locations)
print(f"Stardew Valley - Allsanity Locations without mods: {number_locations}") print(f"Stardew Valley - Allsanity Locations without mods: {number_locations}")
@ -83,10 +84,10 @@ class TestAllSanitySettingsHasAllExpectedLocations(SVTestBase):
class TestAllSanityWithModsSettingsHasAllExpectedLocations(SVTestBase): class TestAllSanityWithModsSettingsHasAllExpectedLocations(SVTestBase):
options = allsanity_mods_6_x_x() options = allsanity_mods_6_x_x_exclude_disabled()
def test_allsanity_with_mods_has_at_least_locations(self): def test_allsanity_with_mods_has_at_least_locations(self):
expected_locations = 3096 expected_locations = 2908
real_locations = self.get_real_locations() real_locations = self.get_real_locations()
number_locations = len(real_locations) number_locations = len(real_locations)
print(f"Stardew Valley - Allsanity Locations with all mods: {number_locations}") print(f"Stardew Valley - Allsanity Locations with all mods: {number_locations}")

View File

@ -13,6 +13,7 @@ from .assertion import RuleAssertMixin
from .options.utils import fill_namespace_with_default, parse_class_option_keys, fill_dataclass_with_default from .options.utils import fill_namespace_with_default, parse_class_option_keys, fill_dataclass_with_default
from .. import StardewValleyWorld, options, StardewItem from .. import StardewValleyWorld, options, StardewItem
from ..options import StardewValleyOption from ..options import StardewValleyOption
from ..options.options import enabled_mods
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -98,6 +99,12 @@ def allsanity_mods_6_x_x():
return allsanity return allsanity
def allsanity_mods_6_x_x_exclude_disabled():
allsanity = allsanity_no_mods_6_x_x()
allsanity.update({options.Mods.internal_name: frozenset(enabled_mods)})
return allsanity
def get_minsanity_options(): def get_minsanity_options():
return { return {
options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_disabled, options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_disabled,