SoE: some cleanup

This commit is contained in:
black-sliver 2022-02-05 14:54:22 +01:00 committed by Fabian Dill
parent 4bf8b98681
commit cb4d9dc365
1 changed files with 7 additions and 7 deletions

View File

@ -66,9 +66,9 @@ def _get_location_mapping() -> typing.Tuple[typing.Dict[str, int], typing.Dict[i
name_to_id = {} name_to_id = {}
id_to_raw = {} id_to_raw = {}
for loc in _locations: for loc in _locations:
apid = _id_offset[loc.type] + loc.index ap_id = _id_offset[loc.type] + loc.index
id_to_raw[apid] = loc id_to_raw[ap_id] = loc
name_to_id[loc.name] = apid name_to_id[loc.name] = ap_id
name_to_id['Done'] = None name_to_id['Done'] = None
return name_to_id, id_to_raw return name_to_id, id_to_raw
@ -79,9 +79,9 @@ def _get_item_mapping() -> typing.Tuple[typing.Dict[str, int], typing.Dict[int,
for item in _items: for item in _items:
if item.name in name_to_id: if item.name in name_to_id:
continue continue
apid = _id_offset[item.type] + item.index ap_id = _id_offset[item.type] + item.index
id_to_raw[apid] = item id_to_raw[ap_id] = item
name_to_id[item.name] = apid name_to_id[item.name] = ap_id
name_to_id['Victory'] = None name_to_id['Victory'] = None
return name_to_id, id_to_raw return name_to_id, id_to_raw