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,16 +1,11 @@
import sys
import random
import sys
from BaseClasses import MultiWorld, get_seed
from . import setup_solo_multiworld, SVTestCase, allsanity_options_without_mods, get_minsanity_options
from . import setup_solo_multiworld, SVTestCase, allsanity_no_mods_6_x_x, get_minsanity_options, solo_multiworld
from .. import StardewValleyWorld
from ..items import Group, item_table
from ..options import Friendsanity, SeasonRandomization, Museumsanity, Shipsanity, Goal
from ..strings.wallet_item_names import Wallet
all_seasons = ["Spring", "Summer", "Fall", "Winter"]
all_farms = ["Standard Farm", "Riverland Farm", "Forest Farm", "Hill-top Farm", "Wilderness Farm", "Four Corners Farm", "Beach Farm"]
class TestItems(SVTestCase):
@@ -48,16 +43,16 @@ class TestItems(SVTestCase):
self.assertEqual(len(baby_permutations), 4)
def test_correct_number_of_stardrops(self):
allsanity_options = allsanity_options_without_mods()
multiworld = setup_solo_multiworld(allsanity_options)
stardrop_items = [item for item in multiworld.get_items() if "Stardrop" in item.name]
self.assertEqual(len(stardrop_items), 7)
allsanity_options = allsanity_no_mods_6_x_x()
with solo_multiworld(allsanity_options) as (multiworld, _):
stardrop_items = [item for item in multiworld.get_items() if item.name == "Stardrop"]
self.assertEqual(len(stardrop_items), 7)
def test_no_duplicate_rings(self):
allsanity_options = allsanity_options_without_mods()
multiworld = setup_solo_multiworld(allsanity_options)
ring_items = [item.name for item in multiworld.get_items() if Group.RING in item_table[item.name].groups]
self.assertEqual(len(ring_items), len(set(ring_items)))
allsanity_options = allsanity_no_mods_6_x_x()
with solo_multiworld(allsanity_options) as (multiworld, _):
ring_items = [item.name for item in multiworld.get_items() if Group.RING in item_table[item.name].groups]
self.assertEqual(len(ring_items), len(set(ring_items)))
def test_can_start_in_any_season(self):
starting_seasons_rolled = set()
@@ -75,66 +70,54 @@ class TestItems(SVTestCase):
starting_seasons_rolled.add(f"{starting_season_items[0]}")
self.assertEqual(len(starting_seasons_rolled), 4)
def test_can_start_on_any_farm(self):
starting_farms_rolled = set()
for attempt_number in range(60):
if len(starting_farms_rolled) >= 7:
print(f"Already got all 7 farm types, breaking early [{attempt_number} generations]")
break
seed = random.randrange(sys.maxsize)
multiworld = setup_solo_multiworld(seed=seed, _cache={})
starting_farm = multiworld.worlds[1].fill_slot_data()["farm_type"]
starting_farms_rolled.add(starting_farm)
self.assertEqual(len(starting_farms_rolled), 7)
class TestMetalDetectors(SVTestCase):
def test_minsanity_1_metal_detector(self):
options = get_minsanity_options()
multiworld = setup_solo_multiworld(options)
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEquals(len(items), 1)
with solo_multiworld(options) as (multiworld, _):
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEqual(len(items), 1)
def test_museumsanity_2_metal_detector(self):
options = get_minsanity_options().copy()
options[Museumsanity.internal_name] = Museumsanity.option_all
multiworld = setup_solo_multiworld(options)
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEquals(len(items), 2)
with solo_multiworld(options) as (multiworld, _):
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEqual(len(items), 2)
def test_shipsanity_full_shipment_1_metal_detector(self):
options = get_minsanity_options().copy()
options[Shipsanity.internal_name] = Shipsanity.option_full_shipment
multiworld = setup_solo_multiworld(options)
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEquals(len(items), 1)
with solo_multiworld(options) as (multiworld, _):
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEqual(len(items), 1)
def test_shipsanity_everything_2_metal_detector(self):
options = get_minsanity_options().copy()
options[Shipsanity.internal_name] = Shipsanity.option_everything
multiworld = setup_solo_multiworld(options)
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEquals(len(items), 2)
with solo_multiworld(options) as (multiworld, _):
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEqual(len(items), 2)
def test_complete_collection_2_metal_detector(self):
options = get_minsanity_options().copy()
options[Goal.internal_name] = Goal.option_complete_collection
multiworld = setup_solo_multiworld(options)
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEquals(len(items), 2)
with solo_multiworld(options) as (multiworld, _):
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEqual(len(items), 2)
def test_perfection_2_metal_detector(self):
options = get_minsanity_options().copy()
options[Goal.internal_name] = Goal.option_perfection
multiworld = setup_solo_multiworld(options)
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEquals(len(items), 2)
with solo_multiworld(options) as (multiworld, _):
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEqual(len(items), 2)
def test_maxsanity_4_metal_detector(self):
options = get_minsanity_options().copy()
options[Museumsanity.internal_name] = Museumsanity.option_all
options[Shipsanity.internal_name] = Shipsanity.option_everything
options[Goal.internal_name] = Goal.option_perfection
multiworld = setup_solo_multiworld(options)
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEquals(len(items), 4)
with solo_multiworld(options) as (multiworld, _):
items = [item.name for item in multiworld.get_items() if item.name == Wallet.metal_detector]
self.assertEqual(len(items), 4)