Zillion: "item counts" OptionGroup (#3338)
This commit is contained in:
parent
2801e21296
commit
8e9a050889
|
@ -14,7 +14,7 @@ from BaseClasses import ItemClassification, LocationProgressType, \
|
|||
from .gen_data import GenData
|
||||
from .logic import cs_to_zz_locs
|
||||
from .region import ZillionLocation, ZillionRegion
|
||||
from .options import ZillionOptions, validate
|
||||
from .options import ZillionOptions, validate, z_option_groups
|
||||
from .id_maps import ZillionSlotInfo, get_slot_info, item_name_to_id as _item_name_to_id, \
|
||||
loc_name_to_id as _loc_name_to_id, make_id_to_others, \
|
||||
zz_reg_name_to_reg_name, base_id
|
||||
|
@ -62,6 +62,8 @@ class ZillionWebWorld(WebWorld):
|
|||
["beauxq"]
|
||||
)]
|
||||
|
||||
option_groups = z_option_groups
|
||||
|
||||
|
||||
class ZillionWorld(World):
|
||||
"""
|
||||
|
|
|
@ -3,7 +3,7 @@ from dataclasses import dataclass
|
|||
from typing import ClassVar, Dict, Tuple
|
||||
from typing_extensions import TypeGuard # remove when Python >= 3.10
|
||||
|
||||
from Options import DefaultOnToggle, NamedRange, PerGameCommonOptions, Range, Toggle, Choice
|
||||
from Options import Choice, DefaultOnToggle, NamedRange, OptionGroup, PerGameCommonOptions, Range, Toggle
|
||||
|
||||
from zilliandomizer.options import (
|
||||
Options as ZzOptions, char_to_gun, char_to_jump, ID,
|
||||
|
@ -279,6 +279,14 @@ class ZillionOptions(PerGameCommonOptions):
|
|||
room_gen: ZillionRoomGen
|
||||
|
||||
|
||||
z_option_groups = [
|
||||
OptionGroup("item counts", [
|
||||
ZillionIDCardCount, ZillionBreadCount, ZillionOpaOpaCount, ZillionZillionCount,
|
||||
ZillionFloppyDiskCount, ZillionScopeCount, ZillionRedIDCardCount
|
||||
])
|
||||
]
|
||||
|
||||
|
||||
def convert_item_counts(ic: "Counter[str]") -> ZzItemCounts:
|
||||
tr: ZzItemCounts = {
|
||||
ID.card: ic["ID Card"],
|
||||
|
|
Loading…
Reference in New Issue