Clique: Update to new options API (#3759)

This commit is contained in:
Scipio Wright
2024-08-11 08:47:17 -04:00
committed by GitHub
parent 8e06ab4f68
commit 68a92b0c6f
5 changed files with 47 additions and 38 deletions

View File

@@ -1,10 +1,13 @@
from typing import Callable
from typing import Callable, TYPE_CHECKING
from BaseClasses import CollectionState, MultiWorld
from BaseClasses import CollectionState
if TYPE_CHECKING:
from . import CliqueWorld
def get_button_rule(multiworld: MultiWorld, player: int) -> Callable[[CollectionState], bool]:
if getattr(multiworld, "hard_mode")[player]:
return lambda state: state.has("Button Activation", player)
def get_button_rule(world: "CliqueWorld") -> Callable[[CollectionState], bool]:
if world.options.hard_mode:
return lambda state: state.has("Button Activation", world.player)
return lambda state: True