mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Lingo: Tests no longer disable forced good item (#2602)
The static class with the "disable forced good item" field is gone. Now, certain tests that want to check for specific access progression can run a method that removes the forced good item and adds it back to the pool. Tests that don't care about this will collect the forced good item like normal. This should prevent the intermittent fill failures on complex doors unit tests, since the forced good item should provide enough locations to fill in.
This commit is contained in:
committed by
GitHub
parent
c8adadb08b
commit
817197c14d
@@ -1,7 +1,6 @@
|
||||
from typing import ClassVar
|
||||
|
||||
from test.bases import WorldTestBase
|
||||
from .. import LingoTestOptions
|
||||
|
||||
|
||||
class LingoTestBase(WorldTestBase):
|
||||
@@ -9,5 +8,10 @@ class LingoTestBase(WorldTestBase):
|
||||
player: ClassVar[int] = 1
|
||||
|
||||
def world_setup(self, *args, **kwargs):
|
||||
LingoTestOptions.disable_forced_good_item = True
|
||||
super().world_setup(*args, **kwargs)
|
||||
|
||||
def remove_forced_good_item(self):
|
||||
location = self.multiworld.get_location("Second Room - Good Luck", self.player)
|
||||
self.remove(location.item)
|
||||
self.multiworld.itempool.append(location.item)
|
||||
self.multiworld.state.events.add(location)
|
||||
|
||||
Reference in New Issue
Block a user