about summary refs log tree commit diff stats
path: root/CMakeLists.txt
blob: e76d0db59a188444fb91b6b21ec8e859f382f8e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
cmake_minimum_required(VERSION 3.28)

project(lingo2_archipelago)

add_subdirectory(proto)
add_subdirectory(tools/util)
add_subdirectory(tools/assign_ids)
add_subdirectory(tools/datapacker)
add_subdirectory(tools/validator)
ass="n">data_pb2 import pkgutil class Lingo2StaticLogic: item_id_to_name: dict[int, str] location_id_to_name: dict[int, str] item_name_to_id: dict[str, int] location_name_to_id: dict[str, int] def __init__(self): self.item_id_to_name = {} self.location_id_to_name = {} file = pkgutil.get_data(__name__, "generated/data.binpb") self.objects = data_pb2.AllObjects() self.objects.ParseFromString(bytearray(file)) for door in self.objects.doors: if door.type == common_pb2.DoorType.STANDARD: location_name = f"{self.objects.rooms[door.room_id].display_name} - {door.name}" self.location_id_to_name[door.ap_id] = location_name if door.type != common_pb2.DoorType.EVENT: item_name = f"{self.objects.rooms[door.room_id].display_name} - {door.name}" self.item_id_to_name[door.ap_id] = item_name self.item_name_to_id = {name: ap_id for ap_id, name in self.item_id_to_name.items()} self.location_name_to_id = {name: ap_id for ap_id, name in self.location_id_to_name.items()}