mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Remove temporary solution "OptionSets" in favor of AutoWorld's Options
This commit is contained in:
116
Options.py
116
Options.py
@@ -21,38 +21,6 @@ class AssembleOptions(type):
|
||||
name.startswith("alias_")})
|
||||
return super(AssembleOptions, mcs).__new__(mcs, name, bases, attrs)
|
||||
|
||||
|
||||
class AssembleCategoryPath(type):
|
||||
def __new__(mcs, name, bases, attrs):
|
||||
path = []
|
||||
for base in bases:
|
||||
if hasattr(base, "segment"):
|
||||
path += base.segment
|
||||
path += attrs["segment"]
|
||||
attrs["path"] = path
|
||||
return super(AssembleCategoryPath, mcs).__new__(mcs, name, bases, attrs)
|
||||
|
||||
|
||||
class RootCategory(metaclass=AssembleCategoryPath):
|
||||
segment = []
|
||||
|
||||
|
||||
class LttPCategory(RootCategory):
|
||||
segment = ["A Link to the Past"]
|
||||
|
||||
|
||||
class LttPRomCategory(LttPCategory):
|
||||
segment = ["rom"]
|
||||
|
||||
|
||||
class FactorioCategory(RootCategory):
|
||||
segment = ["Factorio"]
|
||||
|
||||
|
||||
class MinecraftCategory(RootCategory):
|
||||
segment = ["Minecraft"]
|
||||
|
||||
|
||||
class Option(metaclass=AssembleOptions):
|
||||
value: int
|
||||
name_lookup: typing.Dict[int, str]
|
||||
@@ -216,98 +184,18 @@ class OptionDict(Option):
|
||||
return str(self.value)
|
||||
|
||||
|
||||
class Logic(Choice):
|
||||
option_no_glitches = 0
|
||||
option_minor_glitches = 1
|
||||
option_overworld_glitches = 2
|
||||
option_hybrid_major_glitches = 3
|
||||
option_no_logic = 4
|
||||
alias_owg = 2
|
||||
alias_hmg = 3
|
||||
|
||||
|
||||
class Objective(Choice):
|
||||
option_crystals = 0
|
||||
# option_pendants = 1
|
||||
option_triforce_pieces = 2
|
||||
option_pedestal = 3
|
||||
option_bingo = 4
|
||||
|
||||
|
||||
local_objective = Toggle # local triforce pieces, local dungeon prizes etc.
|
||||
|
||||
|
||||
class Goal(Choice):
|
||||
option_kill_ganon = 0
|
||||
option_kill_ganon_and_gt_agahnim = 1
|
||||
option_hand_in = 2
|
||||
|
||||
|
||||
class Accessibility(Choice):
|
||||
option_locations = 0
|
||||
option_items = 1
|
||||
option_beatable = 2
|
||||
|
||||
|
||||
class Crystals(Range):
|
||||
range_start = 0
|
||||
range_end = 7
|
||||
|
||||
|
||||
class CrystalsTower(Crystals):
|
||||
default = 7
|
||||
|
||||
|
||||
class CrystalsGanon(Crystals):
|
||||
default = 7
|
||||
|
||||
|
||||
class TriforcePieces(Range):
|
||||
default = 30
|
||||
range_start = 1
|
||||
range_end = 90
|
||||
|
||||
|
||||
class ShopItemSlots(Range):
|
||||
range_start = 0
|
||||
range_end = 30
|
||||
|
||||
|
||||
class WorldState(Choice):
|
||||
option_standard = 1
|
||||
option_open = 0
|
||||
option_inverted = 2
|
||||
|
||||
|
||||
class Bosses(Choice):
|
||||
option_vanilla = 0
|
||||
option_simple = 1
|
||||
option_full = 2
|
||||
option_chaos = 3
|
||||
option_singularity = 4
|
||||
|
||||
|
||||
class Enemies(Choice):
|
||||
option_vanilla = 0
|
||||
option_shuffled = 1
|
||||
option_chaos = 2
|
||||
|
||||
|
||||
alttp_options: typing.Dict[str, type(Option)] = {
|
||||
"crystals_needed_for_gt": CrystalsTower,
|
||||
"crystals_needed_for_ganon": CrystalsGanon,
|
||||
"shop_item_slots": ShopItemSlots,
|
||||
}
|
||||
|
||||
# replace with World.options
|
||||
option_sets = (
|
||||
# minecraft_options,
|
||||
# factorio_options,
|
||||
alttp_options,
|
||||
# hollow_knight_options
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
from worlds.alttp.Options import Logic
|
||||
import argparse
|
||||
mapshuffle = Toggle
|
||||
compassshuffle = Toggle
|
||||
|
Reference in New Issue
Block a user