Core: Support inequality operators ("less than") for Choice option string comparisons (#3769)

* add some unit tests to it

* fix

* Update Options.py

Co-authored-by: qwint <qwint.42@gmail.com>

* Update Options.py

---------

Co-authored-by: qwint <qwint.42@gmail.com>
This commit is contained in:
NewSoupVi
2025-07-27 23:29:21 +02:00
committed by GitHub
parent ea1e074083
commit 04a3f78605
5 changed files with 37 additions and 4 deletions

View File

@@ -257,7 +257,7 @@ class WitnessWorld(World):
needed_size = 2
needed_size += self.options.puzzle_randomization == "sigma_expert"
needed_size += self.options.shuffle_symbols
needed_size += self.options.shuffle_doors > 0
needed_size += self.options.shuffle_doors != "off"
# Then, add checks in order until the required amount of sphere 1 checks is met.

View File

@@ -129,7 +129,7 @@ def get_priority_hint_items(world: "WitnessWorld") -> List[str]:
"Shadows Laser",
]
if world.options.shuffle_doors >= 2:
if world.options.shuffle_doors >= "doors":
priority.add("Desert Laser")
priority.update(world.random.sample(lasers, 5))

View File

@@ -435,7 +435,7 @@ class WitnessPlayerLogic:
postgame_adjustments = []
# Make some quick references to some options
remote_doors = world.options.shuffle_doors >= 2 # "Panels" mode has no region accessibility implications.
remote_doors = world.options.shuffle_doors >= "doors" # "Panels" mode has no region accessibility implications.
early_caves = world.options.early_caves
victory = world.options.victory_condition
mnt_lasers = world.options.mountain_lasers
@@ -592,7 +592,7 @@ class WitnessPlayerLogic:
# Make condensed references to some options
remote_doors = world.options.shuffle_doors >= 2 # "Panels" mode has no overarching region access implications.
remote_doors = world.options.shuffle_doors >= "doors" # "Panels" mode has no region access implications.
lasers = world.options.shuffle_lasers
victory = world.options.victory_condition
mnt_lasers = world.options.mountain_lasers