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
81 lines
3.3 KiB
Python
81 lines
3.3 KiB
Python
from ... import options
|
|
from ...options import BuildingProgression, ExcludeGingerIsland, Chefsanity
|
|
from ...test import SVTestBase
|
|
|
|
|
|
class TestRecipeLearnLogic(SVTestBase):
|
|
options = {
|
|
BuildingProgression.internal_name: BuildingProgression.option_progressive,
|
|
options.Cropsanity.internal_name: options.Cropsanity.option_enabled,
|
|
options.Cooksanity.internal_name: options.Cooksanity.option_all,
|
|
Chefsanity.internal_name: Chefsanity.option_none,
|
|
ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_true,
|
|
}
|
|
|
|
def test_can_learn_qos_recipe(self):
|
|
location = "Cook Radish Salad"
|
|
self.assert_cannot_reach_location(location)
|
|
|
|
self.multiworld.state.collect(self.create_item("Progressive House"))
|
|
self.multiworld.state.collect(self.create_item("Radish Seeds"))
|
|
self.multiworld.state.collect(self.create_item("Spring"))
|
|
self.multiworld.state.collect(self.create_item("Summer"))
|
|
self.collect_lots_of_money()
|
|
self.assert_cannot_reach_location(location)
|
|
|
|
self.multiworld.state.collect(self.create_item("The Queen of Sauce"))
|
|
self.assert_can_reach_location(location)
|
|
|
|
|
|
class TestRecipeReceiveLogic(SVTestBase):
|
|
options = {
|
|
BuildingProgression.internal_name: BuildingProgression.option_progressive,
|
|
options.Cropsanity.internal_name: options.Cropsanity.option_enabled,
|
|
options.Cooksanity.internal_name: options.Cooksanity.option_all,
|
|
Chefsanity.internal_name: Chefsanity.option_all,
|
|
ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_true,
|
|
}
|
|
|
|
def test_can_learn_qos_recipe(self):
|
|
location = "Cook Radish Salad"
|
|
self.assert_cannot_reach_location(location)
|
|
|
|
self.multiworld.state.collect(self.create_item("Progressive House"))
|
|
self.multiworld.state.collect(self.create_item("Radish Seeds"))
|
|
self.multiworld.state.collect(self.create_item("Summer"))
|
|
self.collect_lots_of_money()
|
|
self.assert_cannot_reach_location(location)
|
|
|
|
spring = self.create_item("Spring")
|
|
qos = self.create_item("The Queen of Sauce")
|
|
self.multiworld.state.collect(spring)
|
|
self.multiworld.state.collect(qos)
|
|
self.assert_cannot_reach_location(location)
|
|
self.multiworld.state.remove(spring)
|
|
self.multiworld.state.remove(qos)
|
|
|
|
self.multiworld.state.collect(self.create_item("Radish Salad Recipe"))
|
|
self.assert_can_reach_location(location)
|
|
|
|
def test_get_chefsanity_check_recipe(self):
|
|
location = "Radish Salad Recipe"
|
|
self.assert_cannot_reach_location(location)
|
|
|
|
self.multiworld.state.collect(self.create_item("Spring"))
|
|
self.collect_lots_of_money()
|
|
self.assert_cannot_reach_location(location)
|
|
|
|
seeds = self.create_item("Radish Seeds")
|
|
summer = self.create_item("Summer")
|
|
house = self.create_item("Progressive House")
|
|
self.multiworld.state.collect(seeds)
|
|
self.multiworld.state.collect(summer)
|
|
self.multiworld.state.collect(house)
|
|
self.assert_cannot_reach_location(location)
|
|
self.multiworld.state.remove(seeds)
|
|
self.multiworld.state.remove(summer)
|
|
self.multiworld.state.remove(house)
|
|
|
|
self.multiworld.state.collect(self.create_item("The Queen of Sauce"))
|
|
self.assert_can_reach_location(location)
|