Stardew Valley: Refactor buildings to use content packs (#4239)
* 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
This commit is contained in:
@@ -14,18 +14,17 @@ class TestRecipeLearnLogic(SVTestBase):
|
||||
|
||||
def test_can_learn_qos_recipe(self):
|
||||
location = "Cook Radish Salad"
|
||||
rule = self.world.logic.region.can_reach_location(location)
|
||||
self.assert_rule_false(rule, self.multiworld.state)
|
||||
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_rule_false(rule, self.multiworld.state)
|
||||
self.assert_cannot_reach_location(location)
|
||||
|
||||
self.multiworld.state.collect(self.create_item("The Queen of Sauce"))
|
||||
self.assert_rule_true(rule, self.multiworld.state)
|
||||
self.assert_can_reach_location(location)
|
||||
|
||||
|
||||
class TestRecipeReceiveLogic(SVTestBase):
|
||||
@@ -39,34 +38,32 @@ class TestRecipeReceiveLogic(SVTestBase):
|
||||
|
||||
def test_can_learn_qos_recipe(self):
|
||||
location = "Cook Radish Salad"
|
||||
rule = self.world.logic.region.can_reach_location(location)
|
||||
self.assert_rule_false(rule, self.multiworld.state)
|
||||
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_rule_false(rule, self.multiworld.state)
|
||||
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_rule_false(rule, self.multiworld.state)
|
||||
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_rule_true(rule, self.multiworld.state)
|
||||
self.assert_can_reach_location(location)
|
||||
|
||||
def test_get_chefsanity_check_recipe(self):
|
||||
location = "Radish Salad Recipe"
|
||||
rule = self.world.logic.region.can_reach_location(location)
|
||||
self.assert_rule_false(rule, self.multiworld.state)
|
||||
self.assert_cannot_reach_location(location)
|
||||
|
||||
self.multiworld.state.collect(self.create_item("Spring"))
|
||||
self.collect_lots_of_money()
|
||||
self.assert_rule_false(rule, self.multiworld.state)
|
||||
self.assert_cannot_reach_location(location)
|
||||
|
||||
seeds = self.create_item("Radish Seeds")
|
||||
summer = self.create_item("Summer")
|
||||
@@ -74,10 +71,10 @@ class TestRecipeReceiveLogic(SVTestBase):
|
||||
self.multiworld.state.collect(seeds)
|
||||
self.multiworld.state.collect(summer)
|
||||
self.multiworld.state.collect(house)
|
||||
self.assert_rule_false(rule, self.multiworld.state)
|
||||
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_rule_true(rule, self.multiworld.state)
|
||||
self.assert_can_reach_location(location)
|
||||
|
||||
Reference in New Issue
Block a user