| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from . import SVTestBase | 
					
						
							|  |  |  | from .. import options | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TestCropsanityRules(SVTestBase): | 
					
						
							|  |  |  |     options = { | 
					
						
							|  |  |  |         options.Cropsanity.internal_name: options.Cropsanity.option_enabled | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def test_need_greenhouse_for_cactus(self): | 
					
						
							|  |  |  |         harvest_cactus = self.world.logic.region.can_reach_location("Harvest Cactus Fruit") | 
					
						
							|  |  |  |         self.assert_rule_false(harvest_cactus, self.multiworld.state) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-13 15:28:05 -05:00
										 |  |  |         self.multiworld.state.collect(self.world.create_item("Cactus Seeds"), prevent_sweep=False) | 
					
						
							|  |  |  |         self.multiworld.state.collect(self.world.create_item("Shipping Bin"), prevent_sweep=False) | 
					
						
							|  |  |  |         self.multiworld.state.collect(self.world.create_item("Desert Obelisk"), prevent_sweep=False) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         self.assert_rule_false(harvest_cactus, self.multiworld.state) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-13 15:28:05 -05:00
										 |  |  |         self.multiworld.state.collect(self.world.create_item("Greenhouse"), prevent_sweep=False) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         self.assert_rule_true(harvest_cactus, self.multiworld.state) |