summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--apworld/player_logic.py4
-rw-r--r--apworld/regions.py2
-rw-r--r--apworld/static_logic.py20
-rw-r--r--data/maps/four_rooms/metadata.txtpb1
-rw-r--r--data/maps/the_ancient/metadata.txtpb1
-rw-r--r--data/maps/the_bearer/metadata.txtpb1
-rw-r--r--data/maps/the_between/metadata.txtpb1
-rw-r--r--data/maps/the_butterfly/metadata.txtpb1
-rw-r--r--data/maps/the_colorful/metadata.txtpb1
-rw-r--r--data/maps/the_congruent/metadata.txtpb1
-rw-r--r--data/maps/the_darkroom/metadata.txtpb1
-rw-r--r--data/maps/the_digital/metadata.txtpb1
-rw-r--r--data/maps/the_door/metadata.txtpb1
-rw-r--r--data/maps/the_double_sided/metadata.txtpb1
-rw-r--r--data/maps/the_entry/metadata.txtpb1
-rw-r--r--data/maps/the_extravagant/metadata.txtpb1
-rw-r--r--data/maps/the_gallery/metadata.txtpb1
-rw-r--r--data/maps/the_gold/metadata.txtpb1
-rw-r--r--data/maps/the_graveyard/metadata.txtpb1
-rw-r--r--data/maps/the_great/metadata.txtpb1
-rw-r--r--data/maps/the_hinterlands/metadata.txtpb1
-rw-r--r--data/maps/the_hive/metadata.txtpb1
-rw-r--r--data/maps/the_impressive/metadata.txtpb1
-rw-r--r--data/maps/the_invisible/metadata.txtpb1
-rw-r--r--data/maps/the_jubilant/metadata.txtpb1
-rw-r--r--data/maps/the_keen/metadata.txtpb1
-rw-r--r--data/maps/the_liberated/metadata.txtpb1
-rw-r--r--data/maps/the_linear/metadata.txtpb1
-rw-r--r--data/maps/the_lionized/metadata.txtpb1
-rw-r--r--data/maps/the_literate/metadata.txtpb1
-rw-r--r--data/maps/the_lively/metadata.txtpb1
-rw-r--r--data/maps/the_nuanced/metadata.txtpb1
-rw-r--r--data/maps/the_orb/metadata.txtpb1
-rw-r--r--data/maps/the_owl/metadata.txtpb1
-rw-r--r--data/maps/the_parthenon/metadata.txtpb1
-rw-r--r--data/maps/the_partial/metadata.txtpb1
-rw-r--r--data/maps/the_perceptive/metadata.txtpb1
-rw-r--r--data/maps/the_plaza/metadata.txtpb1
-rw-r--r--data/maps/the_quiet/metadata.txtpb1
-rw-r--r--data/maps/the_relentless/metadata.txtpb1
-rw-r--r--data/maps/the_repetitive/metadata.txtpb1
-rw-r--r--data/maps/the_revitalized/metadata.txtpb1
-rw-r--r--data/maps/the_shop/metadata.txtpb1
-rw-r--r--data/maps/the_sirenic/metadata.txtpb1
-rw-r--r--data/maps/the_stormy/metadata.txtpb1
-rw-r--r--data/maps/the_sturdy/metadata.txtpb1
-rw-r--r--proto/data.proto1
-rw-r--r--tools/datapacker/main.cpp17
48 files changed, 81 insertions, 6 deletions
diff --git a/apworld/player_logic.py b/apworld/player_logic.py index f67d7f9..455e24f 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py
@@ -101,6 +101,10 @@ class Lingo2PlayerLogic:
101 self.locations_by_room.setdefault(mastery.room_id, []).append(PlayerLocation(mastery.ap_id, 101 self.locations_by_room.setdefault(mastery.room_id, []).append(PlayerLocation(mastery.ap_id,
102 AccessRequirements())) 102 AccessRequirements()))
103 103
104 for ending in world.static_logic.objects.endings:
105 self.locations_by_room.setdefault(ending.room_id, []).append(PlayerLocation(ending.ap_id,
106 AccessRequirements()))
107
104 def get_panel_reqs(self, panel_id: int, answer: str | None) -> AccessRequirements: 108 def get_panel_reqs(self, panel_id: int, answer: str | None) -> AccessRequirements:
105 if answer is None: 109 if answer is None:
106 if panel_id not in self.panel_reqs: 110 if panel_id not in self.panel_reqs:
diff --git a/apworld/regions.py b/apworld/regions.py index 14fcaac..1c8e672 100644 --- a/apworld/regions.py +++ b/apworld/regions.py
@@ -30,7 +30,7 @@ def create_regions(world: "Lingo2World"):
30 region = create_region(room, world) 30 region = create_region(room, world)
31 regions[region.name] = region 31 regions[region.name] = region
32 32
33 regions["Menu"].connect(regions["the_entry - Starting Room"], "Start Game") 33 regions["Menu"].connect(regions["The Entry - Starting Room"], "Start Game")
34 34
35 # TODO: The requirements of the opposite trigger also matter. 35 # TODO: The requirements of the opposite trigger also matter.
36 for connection in world.static_logic.objects.connections: 36 for connection in world.static_logic.objects.connections:
diff --git a/apworld/static_logic.py b/apworld/static_logic.py index 9cd3ced..965ce3e 100644 --- a/apworld/static_logic.py +++ b/apworld/static_logic.py
@@ -18,7 +18,7 @@ class Lingo2StaticLogic:
18 18
19 for door in self.objects.doors: 19 for door in self.objects.doors:
20 if door.type in [data_pb2.DoorType.STANDARD, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]: 20 if door.type in [data_pb2.DoorType.STANDARD, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]:
21 location_name = f"{self.objects.maps[door.map_id].name} - {door.name}" 21 location_name = f"{self.get_map_object_map_name(door)} - {door.name}"
22 self.location_id_to_name[door.ap_id] = location_name 22 self.location_id_to_name[door.ap_id] = location_name
23 23
24 if door.type not in [data_pb2.DoorType.EVENT, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]: 24 if door.type not in [data_pb2.DoorType.EVENT, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]:
@@ -27,16 +27,20 @@ class Lingo2StaticLogic:
27 27
28 for letter in self.objects.letters: 28 for letter in self.objects.letters:
29 letter_name = f"{letter.key.upper()}{'2' if letter.level2 else '1'}" 29 letter_name = f"{letter.key.upper()}{'2' if letter.level2 else '1'}"
30 location_name = f"{self.objects.maps[self.objects.rooms[letter.room_id].map_id].name} - {letter_name}" 30 location_name = f"{self.get_room_object_map_name(letter)} - {letter_name}"
31 self.location_id_to_name[letter.ap_id] = location_name 31 self.location_id_to_name[letter.ap_id] = location_name
32 32
33 if not letter.level2: 33 if not letter.level2:
34 self.item_id_to_name[letter.ap_id] = letter_name 34 self.item_id_to_name[letter.ap_id] = letter_name
35 35
36 for mastery in self.objects.masteries: 36 for mastery in self.objects.masteries:
37 location_name = f"{self.objects.maps[self.objects.rooms[mastery.room_id].map_id].name} - Mastery" 37 location_name = f"{self.get_room_object_map_name(mastery)} - Mastery"
38 self.location_id_to_name[mastery.ap_id] = location_name 38 self.location_id_to_name[mastery.ap_id] = location_name
39 39
40 for ending in self.objects.endings:
41 location_name = f"{self.get_room_object_map_name(ending)} - {ending.name.title()} Ending"
42 self.location_id_to_name[ending.ap_id] = location_name
43
40 self.item_id_to_name[self.objects.special_ids["Nothing"]] = "Nothing" 44 self.item_id_to_name[self.objects.special_ids["Nothing"]] = "Nothing"
41 45
42 self.item_name_to_id = {name: ap_id for ap_id, name in self.item_id_to_name.items()} 46 self.item_name_to_id = {name: ap_id for ap_id, name in self.item_id_to_name.items()}
@@ -44,8 +48,14 @@ class Lingo2StaticLogic:
44 48
45 def get_door_item_name(self, door_id: int) -> str: 49 def get_door_item_name(self, door_id: int) -> str:
46 door = self.objects.doors[door_id] 50 door = self.objects.doors[door_id]
47 return f"{self.objects.maps[door.map_id].name} - {door.name}" 51 return f"{self.get_map_object_map_name(door)} - {door.name}"
48 52
49 def get_room_region_name(self, room_id: int) -> str: 53 def get_room_region_name(self, room_id: int) -> str:
50 room = self.objects.rooms[room_id] 54 room = self.objects.rooms[room_id]
51 return f"{self.objects.maps[room.map_id].name} - {room.name}" 55 return f"{self.get_map_object_map_name(room)} - {room.name}"
56
57 def get_map_object_map_name(self, obj) -> str:
58 return self.objects.maps[obj.map_id].display_name
59
60 def get_room_object_map_name(self, obj) -> str:
61 return self.get_map_object_map_name(self.objects.rooms[obj.room_id])
diff --git a/data/maps/four_rooms/metadata.txtpb b/data/maps/four_rooms/metadata.txtpb new file mode 100644 index 0000000..ac4631d --- /dev/null +++ b/data/maps/four_rooms/metadata.txtpb
@@ -0,0 +1 @@
display_name: "Four Rooms"
diff --git a/data/maps/the_ancient/metadata.txtpb b/data/maps/the_ancient/metadata.txtpb new file mode 100644 index 0000000..cf6bce3 --- /dev/null +++ b/data/maps/the_ancient/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Ancient"
diff --git a/data/maps/the_bearer/metadata.txtpb b/data/maps/the_bearer/metadata.txtpb new file mode 100644 index 0000000..584c71e --- /dev/null +++ b/data/maps/the_bearer/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Bearer"
diff --git a/data/maps/the_between/metadata.txtpb b/data/maps/the_between/metadata.txtpb new file mode 100644 index 0000000..33f96a1 --- /dev/null +++ b/data/maps/the_between/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Between"
diff --git a/data/maps/the_butterfly/metadata.txtpb b/data/maps/the_butterfly/metadata.txtpb new file mode 100644 index 0000000..5206dfe --- /dev/null +++ b/data/maps/the_butterfly/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Butterfly"
diff --git a/data/maps/the_colorful/metadata.txtpb b/data/maps/the_colorful/metadata.txtpb index 4c475a0..5e67428 100644 --- a/data/maps/the_colorful/metadata.txtpb +++ b/data/maps/the_colorful/metadata.txtpb
@@ -1,2 +1,3 @@
1display_name: "The Colorful"
1# This has something to do with the FISH/FISHES proxy. 2# This has something to do with the FISH/FISHES proxy.
2excluded_nodes: "Components/panel_fake" 3excluded_nodes: "Components/panel_fake"
diff --git a/data/maps/the_congruent/metadata.txtpb b/data/maps/the_congruent/metadata.txtpb new file mode 100644 index 0000000..16428c4 --- /dev/null +++ b/data/maps/the_congruent/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Congruent"
diff --git a/data/maps/the_darkroom/metadata.txtpb b/data/maps/the_darkroom/metadata.txtpb new file mode 100644 index 0000000..e4a1290 --- /dev/null +++ b/data/maps/the_darkroom/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Darkroom"
diff --git a/data/maps/the_digital/metadata.txtpb b/data/maps/the_digital/metadata.txtpb new file mode 100644 index 0000000..e505dcf --- /dev/null +++ b/data/maps/the_digital/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Digital"
diff --git a/data/maps/the_door/metadata.txtpb b/data/maps/the_door/metadata.txtpb new file mode 100644 index 0000000..85dc340 --- /dev/null +++ b/data/maps/the_door/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Door"
diff --git a/data/maps/the_double_sided/metadata.txtpb b/data/maps/the_double_sided/metadata.txtpb new file mode 100644 index 0000000..c354fd8 --- /dev/null +++ b/data/maps/the_double_sided/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Double Sided"
diff --git a/data/maps/the_entry/metadata.txtpb b/data/maps/the_entry/metadata.txtpb index 24d17bf..679454a 100644 --- a/data/maps/the_entry/metadata.txtpb +++ b/data/maps/the_entry/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Entry"
1# This is a debug warp to The Ancient and as far as I can tell there is no way 2# This is a debug warp to The Ancient and as far as I can tell there is no way
2# to access it. 3# to access it.
3excluded_nodes: "Components/Warps/worldport-test" 4excluded_nodes: "Components/Warps/worldport-test"
diff --git a/data/maps/the_extravagant/metadata.txtpb b/data/maps/the_extravagant/metadata.txtpb index 36fc80a..0a35c90 100644 --- a/data/maps/the_extravagant/metadata.txtpb +++ b/data/maps/the_extravagant/metadata.txtpb
@@ -1,2 +1,3 @@
1display_name: "The Extravagant"
1# This appears to be completely inaccessible. 2# This appears to be completely inaccessible.
2excluded_nodes: "Components/Warps/worldport" 3excluded_nodes: "Components/Warps/worldport"
diff --git a/data/maps/the_gallery/metadata.txtpb b/data/maps/the_gallery/metadata.txtpb index c07cb5c..41ec36e 100644 --- a/data/maps/the_gallery/metadata.txtpb +++ b/data/maps/the_gallery/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Gallery"
1# These are the eyes in the foyer, and aren't normal paintings. 2# These are the eyes in the foyer, and aren't normal paintings.
2excluded_nodes: "Components/Paintings/Starting/eye" 3excluded_nodes: "Components/Paintings/Starting/eye"
3excluded_nodes: "Components/Paintings/Starting/eye2" 4excluded_nodes: "Components/Paintings/Starting/eye2"
diff --git a/data/maps/the_gold/metadata.txtpb b/data/maps/the_gold/metadata.txtpb new file mode 100644 index 0000000..fef3e34 --- /dev/null +++ b/data/maps/the_gold/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Gold"
diff --git a/data/maps/the_graveyard/metadata.txtpb b/data/maps/the_graveyard/metadata.txtpb index fbac6ab..0bac222 100644 --- a/data/maps/the_graveyard/metadata.txtpb +++ b/data/maps/the_graveyard/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Graveyard"
1# These really shouldn't be shuffled because it would make Black Ending trivial. 2# These really shouldn't be shuffled because it would make Black Ending trivial.
2excluded_nodes: "Components/Paintings/grave" 3excluded_nodes: "Components/Paintings/grave"
3excluded_nodes: "Components/Paintings/grave2" 4excluded_nodes: "Components/Paintings/grave2"
diff --git a/data/maps/the_great/metadata.txtpb b/data/maps/the_great/metadata.txtpb index d3b3018..b01faf7 100644 --- a/data/maps/the_great/metadata.txtpb +++ b/data/maps/the_great/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Great"
1# This can't be shuffled because it is tilted. 2# This can't be shuffled because it is tilted.
2excluded_nodes: "Components/Paintings/u" 3excluded_nodes: "Components/Paintings/u"
3# This can't be shuffled because it is on the ground. 4# This can't be shuffled because it is on the ground.
diff --git a/data/maps/the_hinterlands/metadata.txtpb b/data/maps/the_hinterlands/metadata.txtpb index b15ef2e..dd1e627 100644 --- a/data/maps/the_hinterlands/metadata.txtpb +++ b/data/maps/the_hinterlands/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Hinterlands"
1# I'm not currently planning on shuffling anything in here. 2# I'm not currently planning on shuffling anything in here.
2excluded_nodes: "Components/Paintings/C" 3excluded_nodes: "Components/Paintings/C"
3excluded_nodes: "Components/Paintings/E" 4excluded_nodes: "Components/Paintings/E"
diff --git a/data/maps/the_hive/metadata.txtpb b/data/maps/the_hive/metadata.txtpb new file mode 100644 index 0000000..8f3894c --- /dev/null +++ b/data/maps/the_hive/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Hive"
diff --git a/data/maps/the_impressive/metadata.txtpb b/data/maps/the_impressive/metadata.txtpb index 3d4e2b5..63929cb 100644 --- a/data/maps/the_impressive/metadata.txtpb +++ b/data/maps/the_impressive/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Impressive"
1# These are apparently little eyes on the Green Eye panel pedestals? I don't 2# These are apparently little eyes on the Green Eye panel pedestals? I don't
2# think they're ever visible in gameplay. 3# think they're ever visible in gameplay.
3excluded_nodes: "Meshes/eye" 4excluded_nodes: "Meshes/eye"
diff --git a/data/maps/the_invisible/metadata.txtpb b/data/maps/the_invisible/metadata.txtpb new file mode 100644 index 0000000..967bf19 --- /dev/null +++ b/data/maps/the_invisible/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Invisible"
diff --git a/data/maps/the_jubilant/metadata.txtpb b/data/maps/the_jubilant/metadata.txtpb new file mode 100644 index 0000000..7de7b85 --- /dev/null +++ b/data/maps/the_jubilant/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Jubilant"
diff --git a/data/maps/the_keen/metadata.txtpb b/data/maps/the_keen/metadata.txtpb new file mode 100644 index 0000000..669f608 --- /dev/null +++ b/data/maps/the_keen/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Keen"
diff --git a/data/maps/the_liberated/metadata.txtpb b/data/maps/the_liberated/metadata.txtpb new file mode 100644 index 0000000..a92d7e5 --- /dev/null +++ b/data/maps/the_liberated/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Liberated"
diff --git a/data/maps/the_linear/metadata.txtpb b/data/maps/the_linear/metadata.txtpb new file mode 100644 index 0000000..989463d --- /dev/null +++ b/data/maps/the_linear/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Linear"
diff --git a/data/maps/the_lionized/metadata.txtpb b/data/maps/the_lionized/metadata.txtpb new file mode 100644 index 0000000..38fd5c2 --- /dev/null +++ b/data/maps/the_lionized/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Lionized"
diff --git a/data/maps/the_literate/metadata.txtpb b/data/maps/the_literate/metadata.txtpb new file mode 100644 index 0000000..76d1df6 --- /dev/null +++ b/data/maps/the_literate/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Literate"
diff --git a/data/maps/the_lively/metadata.txtpb b/data/maps/the_lively/metadata.txtpb new file mode 100644 index 0000000..cbf11c2 --- /dev/null +++ b/data/maps/the_lively/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Lively"
diff --git a/data/maps/the_nuanced/metadata.txtpb b/data/maps/the_nuanced/metadata.txtpb new file mode 100644 index 0000000..9c39826 --- /dev/null +++ b/data/maps/the_nuanced/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Nuanced"
diff --git a/data/maps/the_orb/metadata.txtpb b/data/maps/the_orb/metadata.txtpb index 920422d..0b25353 100644 --- a/data/maps/the_orb/metadata.txtpb +++ b/data/maps/the_orb/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Orb"
1# These are inaccessible, and were probably just copy pasted from the other 2# These are inaccessible, and were probably just copy pasted from the other
2# rooms. 3# rooms.
3excluded_nodes: "Components/Warps/worldport2" 4excluded_nodes: "Components/Warps/worldport2"
diff --git a/data/maps/the_owl/metadata.txtpb b/data/maps/the_owl/metadata.txtpb new file mode 100644 index 0000000..a2004f8 --- /dev/null +++ b/data/maps/the_owl/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Owl"
diff --git a/data/maps/the_parthenon/metadata.txtpb b/data/maps/the_parthenon/metadata.txtpb new file mode 100644 index 0000000..8696c33 --- /dev/null +++ b/data/maps/the_parthenon/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Parthenon"
diff --git a/data/maps/the_partial/metadata.txtpb b/data/maps/the_partial/metadata.txtpb new file mode 100644 index 0000000..48e9f42 --- /dev/null +++ b/data/maps/the_partial/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Partial"
diff --git a/data/maps/the_perceptive/metadata.txtpb b/data/maps/the_perceptive/metadata.txtpb new file mode 100644 index 0000000..e0c64fb --- /dev/null +++ b/data/maps/the_perceptive/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Perceptive"
diff --git a/data/maps/the_plaza/metadata.txtpb b/data/maps/the_plaza/metadata.txtpb new file mode 100644 index 0000000..262fe99 --- /dev/null +++ b/data/maps/the_plaza/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Plaza"
diff --git a/data/maps/the_quiet/metadata.txtpb b/data/maps/the_quiet/metadata.txtpb new file mode 100644 index 0000000..1fa2c46 --- /dev/null +++ b/data/maps/the_quiet/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Quiet"
diff --git a/data/maps/the_relentless/metadata.txtpb b/data/maps/the_relentless/metadata.txtpb new file mode 100644 index 0000000..9515145 --- /dev/null +++ b/data/maps/the_relentless/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Relentless"
diff --git a/data/maps/the_repetitive/metadata.txtpb b/data/maps/the_repetitive/metadata.txtpb index ba1da51..6f5c459 100644 --- a/data/maps/the_repetitive/metadata.txtpb +++ b/data/maps/the_repetitive/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Repetitive"
1# The anti-collectable doesn't fit into our system right now so let's ignore it. 2# The anti-collectable doesn't fit into our system right now so let's ignore it.
2excluded_nodes: "Components/Collectables/anticollectable" 3excluded_nodes: "Components/Collectables/anticollectable"
3# These paintings are directly above/behind panels and thus can't be entered. 4# These paintings are directly above/behind panels and thus can't be entered.
diff --git a/data/maps/the_revitalized/metadata.txtpb b/data/maps/the_revitalized/metadata.txtpb index c3ee426..7c4bf46 100644 --- a/data/maps/the_revitalized/metadata.txtpb +++ b/data/maps/the_revitalized/metadata.txtpb
@@ -1,2 +1,3 @@
1display_name: "The Revitalized"
1# Let's not include the demo (for now). 2# Let's not include the demo (for now).
2excluded_nodes: "Components/panel_demo" 3excluded_nodes: "Components/panel_demo"
diff --git a/data/maps/the_shop/metadata.txtpb b/data/maps/the_shop/metadata.txtpb new file mode 100644 index 0000000..06f7fed --- /dev/null +++ b/data/maps/the_shop/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Shop"
diff --git a/data/maps/the_sirenic/metadata.txtpb b/data/maps/the_sirenic/metadata.txtpb new file mode 100644 index 0000000..19e26a3 --- /dev/null +++ b/data/maps/the_sirenic/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Sirenic"
diff --git a/data/maps/the_stormy/metadata.txtpb b/data/maps/the_stormy/metadata.txtpb new file mode 100644 index 0000000..42b1814 --- /dev/null +++ b/data/maps/the_stormy/metadata.txtpb
@@ -0,0 +1 @@
display_name: "The Stormy"
diff --git a/data/maps/the_sturdy/metadata.txtpb b/data/maps/the_sturdy/metadata.txtpb index a0ffc7a..9f42137 100644 --- a/data/maps/the_sturdy/metadata.txtpb +++ b/data/maps/the_sturdy/metadata.txtpb
@@ -1,3 +1,4 @@
1display_name: "The Sturdy"
1# Let's ignore the second half of the rainbow for now. 2# Let's ignore the second half of the rainbow for now.
2#excluded_nodes: "Components/Doors/Rainbow2/Hinge/rainbowMirrored" 3#excluded_nodes: "Components/Doors/Rainbow2/Hinge/rainbowMirrored"
3# I don't know why there's a second copy of the rainbow. 4# I don't know why there's a second copy of the rainbow.
diff --git a/proto/data.proto b/proto/data.proto index 0d43168..498543c 100644 --- a/proto/data.proto +++ b/proto/data.proto
@@ -187,6 +187,7 @@ message Room {
187message Map { 187message Map {
188 optional uint64 id = 1; 188 optional uint64 id = 1;
189 optional string name = 2; 189 optional string name = 2;
190 optional string display_name = 3;
190} 191}
191 192
192message AllObjects { 193message AllObjects {
diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index c5a90e9..3ddb11f 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp
@@ -68,11 +68,28 @@ class DataPacker {
68 void ProcessMap(std::filesystem::path path) { 68 void ProcessMap(std::filesystem::path path) {
69 std::string map_name = path.filename().string(); 69 std::string map_name = path.filename().string();
70 70
71 ProcessMapMetadataFile(path / "metadata.txtpb", map_name);
71 ProcessConnectionsFile(path / "connections.txtpb", map_name); 72 ProcessConnectionsFile(path / "connections.txtpb", map_name);
72 ProcessDoorsFile(path / "doors.txtpb", map_name); 73 ProcessDoorsFile(path / "doors.txtpb", map_name);
73 ProcessRooms(path / "rooms", map_name); 74 ProcessRooms(path / "rooms", map_name);
74 } 75 }
75 76
77 void ProcessMapMetadataFile(std::filesystem::path path,
78 const std::string& map_name) {
79 if (!std::filesystem::exists(path)) {
80 return;
81 }
82
83 auto metadata = ReadMessageFromFile<HumanMap>(path.string());
84
85 uint64_t map_id = container_.FindOrAddMap(map_name);
86 Map& map = *container_.all_objects().mutable_maps(map_id);
87
88 if (metadata.has_display_name()) {
89 map.set_display_name(metadata.display_name());
90 }
91 }
92
76 void ProcessRooms(std::filesystem::path path, 93 void ProcessRooms(std::filesystem::path path,
77 const std::string& current_map_name) { 94 const std::string& current_map_name) {
78 for (auto const& dir_entry : std::filesystem::directory_iterator(path)) { 95 for (auto const& dir_entry : std::filesystem::directory_iterator(path)) {