 9ac921380f
			
		
	
	9ac921380f
	
	
	
		
			
			* 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
		
			
				
	
	
		
			55 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| from ...options import SeasonRandomization, Friendsanity, FriendsanityHeartSize
 | |
| from ...test import SVTestBase
 | |
| 
 | |
| 
 | |
| class TestFriendsanityDatingRules(SVTestBase):
 | |
|     options = {
 | |
|         SeasonRandomization.internal_name: SeasonRandomization.option_randomized_not_winter,
 | |
|         Friendsanity.internal_name: Friendsanity.option_all_with_marriage,
 | |
|         FriendsanityHeartSize.internal_name: 3
 | |
|     }
 | |
| 
 | |
|     def test_earning_dating_heart_requires_dating(self):
 | |
|         self.collect_all_the_money()
 | |
|         self.multiworld.state.collect(self.create_item("Fall"))
 | |
|         self.multiworld.state.collect(self.create_item("Beach Bridge"))
 | |
|         self.multiworld.state.collect(self.create_item("Progressive House"))
 | |
|         for i in range(3):
 | |
|             self.multiworld.state.collect(self.create_item("Progressive Pickaxe"))
 | |
|             self.multiworld.state.collect(self.create_item("Progressive Weapon"))
 | |
|             self.multiworld.state.collect(self.create_item("Progressive Axe"))
 | |
|             self.multiworld.state.collect(self.create_item("Progressive Barn"))
 | |
|         for i in range(10):
 | |
|             self.multiworld.state.collect(self.create_item("Foraging Level"))
 | |
|             self.multiworld.state.collect(self.create_item("Farming Level"))
 | |
|             self.multiworld.state.collect(self.create_item("Mining Level"))
 | |
|             self.multiworld.state.collect(self.create_item("Combat Level"))
 | |
|             self.multiworld.state.collect(self.create_item("Progressive Mine Elevator"))
 | |
|             self.multiworld.state.collect(self.create_item("Progressive Mine Elevator"))
 | |
| 
 | |
|         npc = "Abigail"
 | |
|         heart_name = f"{npc} <3"
 | |
|         step = 3
 | |
| 
 | |
|         self.assert_can_reach_heart_up_to(npc, 3, step)
 | |
|         self.multiworld.state.collect(self.create_item(heart_name))
 | |
|         self.assert_can_reach_heart_up_to(npc, 6, step)
 | |
|         self.multiworld.state.collect(self.create_item(heart_name))
 | |
|         self.assert_can_reach_heart_up_to(npc, 8, step)
 | |
|         self.multiworld.state.collect(self.create_item(heart_name))
 | |
|         self.assert_can_reach_heart_up_to(npc, 10, step)
 | |
|         self.multiworld.state.collect(self.create_item(heart_name))
 | |
|         self.assert_can_reach_heart_up_to(npc, 14, step)
 | |
| 
 | |
|     def assert_can_reach_heart_up_to(self, npc: str, max_reachable: int, step: int):
 | |
|         prefix = "Friendsanity: "
 | |
|         suffix = " <3"
 | |
|         for i in range(1, max_reachable + 1):
 | |
|             if i % step != 0 and i != 14:
 | |
|                 continue
 | |
|             self.assert_can_reach_location(f"{prefix}{npc} {i}{suffix}")
 | |
|         for i in range(max_reachable + 1, 14 + 1):
 | |
|             if i % step != 0 and i != 14:
 | |
|                 continue
 | |
|             self.assert_cannot_reach_location(f"{prefix}{npc} {i}{suffix}")
 |