SMZ3: data package fix (#996)
This commit is contained in:
parent
539d2e80f1
commit
0cbb3c2839
|
@ -1271,7 +1271,8 @@ async def game_watcher(ctx: Context):
|
|||
snes_buffered_write(ctx, SMZ3_RECV_PROGRESS_ADDR + 0x680, bytes([recv_index & 0xFF, (recv_index >> 8) & 0xFF]))
|
||||
|
||||
from worlds.smz3.TotalSMZ3.Location import locations_start_id
|
||||
location_id = locations_start_id + itemIndex
|
||||
from worlds.smz3 import convertLocSMZ3IDToAPID
|
||||
location_id = locations_start_id + convertLocSMZ3IDToAPID(itemIndex)
|
||||
|
||||
ctx.locations_checked.add(location_id)
|
||||
location = ctx.location_names[location_id]
|
||||
|
|
|
@ -25,6 +25,10 @@ from Options import Accessibility
|
|||
world_folder = os.path.dirname(__file__)
|
||||
logger = logging.getLogger("SMZ3")
|
||||
|
||||
# Location IDs in the range 256+196 to 256+202 shifted +34 between 11.2 and 11.3
|
||||
# this is required to keep backward compatibility
|
||||
def convertLocSMZ3IDToAPID(value):
|
||||
return (value - 34) if value >= 256+230 and value <= 256+236 else value
|
||||
|
||||
class SMZ3CollectionState(metaclass=AutoLogicRegister):
|
||||
def init_mixin(self, parent: MultiWorld):
|
||||
|
@ -61,12 +65,13 @@ class SMZ3World(World):
|
|||
"""
|
||||
game: str = "SMZ3"
|
||||
topology_present = False
|
||||
data_version = 2
|
||||
data_version = 3
|
||||
option_definitions = smz3_options
|
||||
item_names: Set[str] = frozenset(TotalSMZ3Item.lookup_name_to_id)
|
||||
location_names: Set[str]
|
||||
item_name_to_id = TotalSMZ3Item.lookup_name_to_id
|
||||
location_name_to_id: Dict[str, int] = {key : locations_start_id + value.Id for key, value in TotalSMZ3World(Config(), "", 0, "").locationLookup.items()}
|
||||
location_name_to_id: Dict[str, int] = {key : locations_start_id + convertLocSMZ3IDToAPID(value.Id)
|
||||
for key, value in TotalSMZ3World(Config(), "", 0, "").locationLookup.items()}
|
||||
web = SMZ3Web()
|
||||
|
||||
remote_items: bool = False
|
||||
|
|
Loading…
Reference in New Issue