mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
* create building data object and rename ItemSource to Source to be more generic # Conflicts: # worlds/stardew_valley/content/game_content.py # Conflicts: # worlds/stardew_valley/data/artisan.py # worlds/stardew_valley/data/game_item.py # worlds/stardew_valley/data/harvest.py # worlds/stardew_valley/data/shop.py * remove compound sources, replace by other requirements which already handle this usecase * add coops to content packs * add building progression in game features * add shippping bin to starting building; remove has_house * replace config check with feature * add other buildings in content packs * not passing * tests passes, unbelievable * use newly create methods more * use new assets to ease readability * self review * fix flake8 maybe * properly split rule for mapping cave systems * fix tractor garage name * self review * add upgrade_from to farm house buldings * don't override building name variable in logic * remove has_group from buildings * mark some items easy in grinding logic so blueprints buildings can be in more early spheres * move stuff around to maybe avoid future conflicts cuz I have like 10 PRs opened right now * remove price_multiplier, turns out it's unused during generation * disable shop source for mapping cave systems * bunch of code review changes * add petbowl and farmhouse to autobuilding * set min easy items to 300 * fix farm type
84 lines
3.2 KiB
Python
84 lines
3.2 KiB
Python
from ...locations import LocationTags, location_table
|
|
from ...options import BuildingProgression, Shipsanity
|
|
from ...test import SVTestBase
|
|
|
|
|
|
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 = {
|
|
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)
|