Stardew Valley: Update Mod Content (#4416)
This commit is contained in:
parent
dae9d4c575
commit
79e6beeec3
|
@ -11,7 +11,7 @@ from ..strings.craftable_names import Bomb, Fence, Sprinkler, WildSeeds, Floor,
|
|||
from ..strings.crop_names import Fruit, Vegetable
|
||||
from ..strings.currency_names import Currency
|
||||
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.food_names import Meal
|
||||
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,
|
||||
{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}
|
||||
|
|
|
@ -2935,6 +2935,10 @@ id,region,name,tags,mod_name
|
|||
7433,Farm,Craft Composter,CRAFTSANITY,Binning Skill
|
||||
7434,Farm,Craft Recycling Bin,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
|
||||
7452,Adventurer's Guild,Travel Core Recipe,CRAFTSANITY,Magic
|
||||
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
|
||||
8200,Shipping,Shipsanity: Wooden Display,SHIPSANITY,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
|
||||
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
|
||||
|
|
|
|
@ -110,6 +110,8 @@ class LocationTags(enum.Enum):
|
|||
MAGIC_LEVEL = enum.auto()
|
||||
ARCHAEOLOGY_LEVEL = enum.auto()
|
||||
|
||||
DEPRECATED = enum.auto()
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LocationData:
|
||||
|
@ -519,6 +521,10 @@ def create_locations(location_collector: StardewLocationCollector,
|
|||
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]:
|
||||
# On Meadowlands, "Feeding Animals" replaces "Raising Animals"
|
||||
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]:
|
||||
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_qi_filter = filter_qi_order_locations(options, locations_island_filter)
|
||||
locations_masteries_filter = filter_masteries_locations(content, locations_qi_filter)
|
||||
|
|
|
@ -757,6 +757,14 @@ class Gifting(Toggle):
|
|||
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,
|
||||
# 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
|
||||
|
@ -766,8 +774,7 @@ disabled_mods = {ModNames.deepwoods, ModNames.magic,
|
|||
ModNames.wellwick, ModNames.shiko, ModNames.delores, ModNames.riley,
|
||||
ModNames.boarding_house}
|
||||
|
||||
if 'unittest' in sys.modules.keys() or 'pytest' in sys.modules.keys():
|
||||
disabled_mods = {}
|
||||
enabled_mods = all_mods.difference(disabled_mods)
|
||||
|
||||
|
||||
class Mods(OptionSet):
|
||||
|
@ -775,13 +782,11 @@ class Mods(OptionSet):
|
|||
visibility = Visibility.all & ~Visibility.simple_ui
|
||||
internal_name = "mods"
|
||||
display_name = "Mods"
|
||||
valid_keys = {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}.difference(disabled_mods)
|
||||
valid_keys = enabled_mods
|
||||
# In tests, we keep even the disabled mods active, because we expect some of them to eventually get updated for SV 1.6
|
||||
# In that case, we want to maintain content and logic for them, and therefore keep testing them
|
||||
if 'unittest' in sys.modules.keys() or 'pytest' in sys.modules.keys():
|
||||
valid_keys = all_mods
|
||||
|
||||
|
||||
class BundlePlando(OptionSet):
|
||||
|
|
|
@ -201,6 +201,10 @@ class ModMachine:
|
|||
composter = "Composter"
|
||||
recycling_bin = "Recycling Bin"
|
||||
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:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
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 ..items import Group, item_table
|
||||
|
||||
|
@ -70,7 +71,7 @@ class TestAllSanitySettingsHasAllExpectedLocations(SVTestBase):
|
|||
options = allsanity_no_mods_6_x_x()
|
||||
|
||||
def test_allsanity_without_mods_has_at_least_locations(self):
|
||||
expected_locations = 2238
|
||||
expected_locations = 2256
|
||||
real_locations = self.get_real_locations()
|
||||
number_locations = len(real_locations)
|
||||
print(f"Stardew Valley - Allsanity Locations without mods: {number_locations}")
|
||||
|
@ -83,10 +84,10 @@ class TestAllSanitySettingsHasAllExpectedLocations(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):
|
||||
expected_locations = 3096
|
||||
expected_locations = 2908
|
||||
real_locations = self.get_real_locations()
|
||||
number_locations = len(real_locations)
|
||||
print(f"Stardew Valley - Allsanity Locations with all mods: {number_locations}")
|
||||
|
|
|
@ -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 .. import StardewValleyWorld, options, StardewItem
|
||||
from ..options import StardewValleyOption
|
||||
from ..options.options import enabled_mods
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -98,6 +99,12 @@ def allsanity_mods_6_x_x():
|
|||
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():
|
||||
return {
|
||||
options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_disabled,
|
||||
|
|
Loading…
Reference in New Issue