Skip to content

Commit

Permalink
Renamed Trap Removal settings for YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehseezed committed Feb 11, 2024
1 parent ef91d28 commit 7c8399b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
10 changes: 5 additions & 5 deletions worlds/am2r/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Dict, List, NamedTuple, Set

from BaseClasses import Item, ItemClassification, MultiWorld
from .options import MetroidsAreChecks, MetroidsRequired, get_option_value, TrapFillPercentage, TrapEquipment, TapToss, TrapShort, TrapEMP
from .options import MetroidsAreChecks, MetroidsRequired, get_option_value, TrapFillPercentage, RemoveEquipmentTrap, RemoveTossTrap, RemoveShortBeam, RemoveEMPTrap


class ItemData(NamedTuple):
Expand Down Expand Up @@ -40,16 +40,16 @@ def create_metroid_items(MetroidsRequired: MetroidsRequired, MetroidsAreChecks:
def create_trap_items(multiworld: MultiWorld, player: int, locations_to_trap: int) -> List[str]:
trap_pool = trap_weights.copy()

if multiworld.TrapEquipment[player].value == 1:
if multiworld.RemoveEquipmentTrap[player].value == 1:
del trap_pool["Equipment Trap"]

if multiworld.TapToss[player].value == 1:
if multiworld.RemoveTossTrap[player].value == 1:
del trap_pool["Big Toss Trap"]

if multiworld.TrapShort[player].value == 1:
if multiworld.RemoveShortBeam[player].value == 1:
del trap_pool["Short Beam"]

if multiworld.TrapEMP[player].value == 1:
if multiworld.RemoveEMPTrap[player].value == 1:
del trap_pool["EMP Trap"]

return multiworld.random.choices(
Expand Down
20 changes: 12 additions & 8 deletions worlds/am2r/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,23 @@ class TrapFillPercentage(Range):
default = 0


class TrapEquipment(Toggle):
class RemoveEquipmentTrap(Toggle):
"""Removes Equipment Traps from trap fill"""
display_name = "Remove Equipment Trap"


class TapToss(Toggle):
class RemoveTossTrap(Toggle):
"""Removes Big Toss Trap from trap fill"""
display_name = "Remove Toss Trap"


class TrapShort(Toggle):
class RemoveShortBeam(Toggle):
"""Removes Short Bema from trap fill"""
display_name = "Remove Short Beam"


class TrapEMP(Toggle):
class RemoveEMPTrap(Toggle):
"""Removes EMP Traps from trap fill"""
display_name = "Remove EMP Trap"


Expand Down Expand Up @@ -97,10 +101,10 @@ class TrapEMP(Toggle):
"MetroidsRequired": MetroidsRequired,
"MetroidsAreChecks": MetroidsAreChecks,
"TrapFillPercentage": TrapFillPercentage,
"TrapEquipment": TrapEquipment,
"TapToss": TapToss,
"TrapShort": TrapShort,
"TrapEMP": TrapEMP,
"TrapEquipment": RemoveEquipmentTrap,
"TapToss": RemoveTossTrap,
"TrapShort": RemoveShortBeam,
"TrapEMP": RemoveEMPTrap,
# "Item Sprites": ItemSprites,
# "Starting Weapons": StartingWeapons,
# "Randomize Baby", RandomizeBaby
Expand Down

0 comments on commit 7c8399b

Please sign in to comment.