Files
Grinch-AP/worlds/stardew_valley/test/assertion/mod_assert.py
agilbert1412 9b22458f44 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
2024-07-07 15:04:25 +02:00

29 lines
1.2 KiB
Python

from typing import Union, Iterable
from unittest import TestCase
from BaseClasses import MultiWorld
from ... import item_table, location_table
from ...mods.mod_data import ModNames
class ModAssertMixin(TestCase):
def assert_stray_mod_items(self, chosen_mods: Union[Iterable[str], str], multiworld: MultiWorld):
if isinstance(chosen_mods, str):
chosen_mods = [chosen_mods]
else:
chosen_mods = list(chosen_mods)
if ModNames.jasper in chosen_mods:
# Jasper is a weird case because it shares NPC w/ SVE...
chosen_mods.append(ModNames.sve)
for multiworld_item in multiworld.get_items():
item = item_table[multiworld_item.name]
self.assertTrue(item.mod_name is None or item.mod_name in chosen_mods,
f"Item {item.name} has is from mod {item.mod_name}. Allowed mods are {chosen_mods}.")
for multiworld_location in multiworld.get_locations():
if multiworld_location.address is None:
continue
location = location_table[multiworld_location.name]
self.assertTrue(location.mod_name is None or location.mod_name in chosen_mods)