Zillion: use Option.current_key
and other minor fixes
This commit is contained in:
@@ -2,13 +2,12 @@ from collections import deque, Counter
|
||||
from contextlib import redirect_stdout
|
||||
import functools
|
||||
import threading
|
||||
from typing import Any, Dict, List, Set, Tuple, Optional, cast
|
||||
from typing import Any, Dict, List, Literal, Set, Tuple, Optional, cast
|
||||
import os
|
||||
import logging
|
||||
|
||||
from BaseClasses import ItemClassification, LocationProgressType, \
|
||||
MultiWorld, Item, CollectionState, Entrance, Tutorial
|
||||
from Options import AssembleOptions
|
||||
from .logic import cs_to_zz_locs
|
||||
from .region import ZillionLocation, ZillionRegion
|
||||
from .options import ZillionStartChar, zillion_options, validate
|
||||
@@ -48,17 +47,17 @@ class ZillionWorld(World):
|
||||
game = "Zillion"
|
||||
web = ZillionWebWorld()
|
||||
|
||||
option_definitions: Dict[str, AssembleOptions] = zillion_options
|
||||
topology_present: bool = True # indicate if world type has any meaningful layout/pathing
|
||||
option_definitions = zillion_options
|
||||
topology_present = True # indicate if world type has any meaningful layout/pathing
|
||||
|
||||
# map names to their IDs
|
||||
item_name_to_id: Dict[str, int] = _item_name_to_id
|
||||
location_name_to_id: Dict[str, int] = _loc_name_to_id
|
||||
item_name_to_id = _item_name_to_id
|
||||
location_name_to_id = _loc_name_to_id
|
||||
|
||||
# increment this every time something in your world's names/id mappings changes.
|
||||
# While this is set to 0 in *any* AutoWorld, the entire DataPackage is considered in testing mode and will be
|
||||
# retrieved by clients on every connection.
|
||||
data_version: int = 1
|
||||
data_version = 1
|
||||
|
||||
logger: logging.Logger
|
||||
|
||||
@@ -250,7 +249,7 @@ class ZillionWorld(World):
|
||||
if group["game"] == "Zillion":
|
||||
assert "item_pool" in group
|
||||
item_pool = group["item_pool"]
|
||||
to_stay = "JJ"
|
||||
to_stay: Literal['Apple', 'Champ', 'JJ'] = "JJ"
|
||||
if "JJ" in item_pool:
|
||||
assert "players" in group
|
||||
group_players = group["players"]
|
||||
|
||||
Reference in New Issue
Block a user