mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-05-27 14:59:56 -07:00
Stardew Valley: Improve generation performance by around 11% by moving calculating from rule evaluation to collect (#4231)
This commit is contained in:
@@ -69,14 +69,17 @@ class TestShipsanityEverything(SVTestBase):
|
||||
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]
|
||||
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.remove(bin_item)
|
||||
self.assertFalse(self.world.logic.region.can_reach_location(location.name)(self.multiworld.state))
|
||||
self.multiworld.state.collect(bin_item)
|
||||
|
||||
self.collect(bin_item)
|
||||
shipsanity_rule = self.world.logic.region.can_reach_location(location.name)
|
||||
self.assert_rule_true(shipsanity_rule, self.multiworld.state)
|
||||
|
||||
self.remove(bin_item)
|
||||
|
||||
Reference in New Issue
Block a user