Files
Archipelago/worlds/stardew_valley/test/rules/TestShipping.py
agilbert1412 1de91fab67 Stardew Valley: 7.x.x - The Jojapocalypse Update (#5432)
Major Content update for Stardew Valley

### Features
- New BundleRandomization Value: Meme Bundles - Over 100 custom bundles, designed to be jokes, references, trolls, etc
- New Setting: Bundles Per Room modifier
- New Setting: Backpack Size
- New Setting: Secretsanity - Checks for triggering easter eggs and secrets
- New Setting: Moviesanity - Checks for watching movies and sharing snacks with Villagers
- New Setting: Eatsanity - Checks for eating items
- New Setting: Hatsanity - Checks for wearing Hats
- New Setting: Start Without - Allows you to select any combination of various "starting" items, that you will actually not start with. Notably, tools, backpack slots, Day5 unlocks, etc.
- New Setting: Allowed Filler Items - Allows you to customize the filler items you'll get
- New Setting: Endgame Locations - Checks for various expensive endgame tasks and purchases
- New Shipsanity value: Crops and Fish
- New Settings: Jojapocalypse and settings to customize it
- Bundle Plando: Replaced with BundleWhitelist and BundleBlacklist, for more customization freedom
- Added a couple of Host.yaml settings to help hosts allow or ban specific difficult settings that could cause problems if the people don't know what they are signing up for.

Plus a truckload of improvements on the mod side, not seen in this PR.

### Removed features
- Integration for Stardew Valley Expanded. It is simply disabled, the code is all still there, but I'm extremely tired of providing tech support for it, plus Stardew Valley 1.7 was announced and that will break it again, so I'm done. When a maintainer steps up, it can be re-enabled.
2026-02-15 18:02:21 +01:00

86 lines
3.4 KiB
Python

from ..bases import SVTestBase
from ... import StartWithoutOptionName
from ...locations import LocationTags, location_table
from ...options import BuildingProgression, Shipsanity, StartWithout
class TestShipsanityNone(SVTestBase):
options = {
Shipsanity.internal_name: Shipsanity.option_none
}
def test_no_shipsanity_locations(self):
for location in self.get_real_locations():
self.assertFalse("Shipsanity" in location.name)
self.assertNotIn(LocationTags.SHIPSANITY, location_table[location.name].tags)
class TestShipsanityCrops(SVTestBase):
options = {
Shipsanity.internal_name: Shipsanity.option_crops
}
def test_only_crop_shipsanity_locations(self):
for location in self.get_real_locations():
if LocationTags.SHIPSANITY in location_table[location.name].tags:
self.assertIn(LocationTags.SHIPSANITY_CROP, location_table[location.name].tags)
class TestShipsanityFish(SVTestBase):
options = {
Shipsanity.internal_name: Shipsanity.option_fish
}
def test_only_fish_shipsanity_locations(self):
for location in self.get_real_locations():
if LocationTags.SHIPSANITY in location_table[location.name].tags:
self.assertIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags)
class TestShipsanityFullShipment(SVTestBase):
options = {
Shipsanity.internal_name: Shipsanity.option_full_shipment
}
def test_only_full_shipment_shipsanity_locations(self):
for location in self.get_real_locations():
if LocationTags.SHIPSANITY in location_table[location.name].tags:
self.assertIn(LocationTags.SHIPSANITY_FULL_SHIPMENT, location_table[location.name].tags)
self.assertNotIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags)
class TestShipsanityFullShipmentWithFish(SVTestBase):
options = {
Shipsanity.internal_name: Shipsanity.option_full_shipment_with_fish
}
def test_only_full_shipment_and_fish_shipsanity_locations(self):
for location in self.get_real_locations():
if LocationTags.SHIPSANITY in location_table[location.name].tags:
self.assertTrue(LocationTags.SHIPSANITY_FULL_SHIPMENT in location_table[location.name].tags or
LocationTags.SHIPSANITY_FISH in location_table[location.name].tags)
class TestShipsanityEverything(SVTestBase):
options = {
StartWithout.internal_name: frozenset({StartWithoutOptionName.buildings}),
Shipsanity.internal_name: Shipsanity.option_everything,
BuildingProgression.internal_name: BuildingProgression.option_progressive
}
def test_all_shipsanity_locations_require_shipping_bin(self):
bin_name = "Shipping Bin"
self.collect_all_except(bin_name)
shipsanity_locations = [location
for location in self.get_real_locations()
if LocationTags.SHIPSANITY in location_table[location.name].tags]
bin_item = self.create_item(bin_name)
for location in shipsanity_locations:
with self.subTest(location.name):
self.assert_cannot_reach_location(location.name)
self.collect(bin_item)
self.assert_can_reach_location(location.name)
self.remove(bin_item)