diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-07 16:05:15 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-07 16:05:15 -0400 |
commit | c9da387ede51f207825b63d9f13036a7b661d4b3 (patch) | |
tree | 08425dbc57c92ac72fef43c32ecbd5805f18f1f8 | |
parent | 3c26cedd030c464e3b8a5576a98c19eb45134658 (diff) | |
download | lingo2-archipelago-c9da387ede51f207825b63d9f13036a7b661d4b3.tar.gz lingo2-archipelago-c9da387ede51f207825b63d9f13036a7b661d4b3.tar.bz2 lingo2-archipelago-c9da387ede51f207825b63d9f13036a7b661d4b3.zip |
Started apworld
vcpkg's libprotobuf is older than what PIP has, but neither are completely up to date either. Ugh. Doors have a room now because that's where the location will go.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | apworld/__init__.py | 38 | ||||
-rw-r--r-- | apworld/locations.py | 5 | ||||
-rw-r--r-- | apworld/options.py | 8 | ||||
-rw-r--r-- | apworld/player_logic.py | 24 | ||||
-rw-r--r-- | apworld/regions.py | 28 | ||||
-rw-r--r-- | apworld/requirements.txt | 1 | ||||
-rw-r--r-- | apworld/static_logic.py | 9 | ||||
-rw-r--r-- | data/maps/the_entry/doors.txtpb | 34 | ||||
-rw-r--r-- | proto/data.proto | 2 | ||||
-rw-r--r-- | proto/human.proto | 1 | ||||
-rw-r--r-- | tools/datapacker/main.cpp | 8 | ||||
-rw-r--r-- | vcpkg.json | 8 |
13 files changed, 167 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index bf52fcf..84ef9bb 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -1,3 +1,5 @@ | |||
1 | build/ | 1 | build/ |
2 | generated/ | 2 | generated/ |
3 | .vscode/ | 3 | .vscode/ |
4 | apworld/generated/ | ||
5 | __pycache__ | ||
diff --git a/apworld/__init__.py b/apworld/__init__.py new file mode 100644 index 0000000..013910e --- /dev/null +++ b/apworld/__init__.py | |||
@@ -0,0 +1,38 @@ | |||
1 | """ | ||
2 | Archipelago init file for Lingo 2 | ||
3 | """ | ||
4 | from worlds.AutoWorld import WebWorld, World | ||
5 | from .options import Lingo2Options | ||
6 | from .player_logic import Lingo2PlayerLogic | ||
7 | from .regions import create_regions | ||
8 | from .static_logic import Lingo2StaticLogic | ||
9 | |||
10 | |||
11 | class Lingo2WebWorld(WebWorld): | ||
12 | rich_text_options_doc = True | ||
13 | theme = "grass" | ||
14 | |||
15 | |||
16 | class Lingo2World(World): | ||
17 | """ | ||
18 | Lingo 2 is a first person indie puzzle game where you solve word puzzles in a labyrinthe world. Compared to its | ||
19 | predecessor, Lingo 2 has new mechanics, more areas, and a unique progression system where you have to unlock letters | ||
20 | before using them in puzzle solutions. | ||
21 | """ | ||
22 | game = "Lingo 2" | ||
23 | web = Lingo2WebWorld() | ||
24 | |||
25 | options_dataclass = Lingo2Options | ||
26 | options: Lingo2Options | ||
27 | |||
28 | item_name_to_id = {} | ||
29 | location_name_to_id = {} | ||
30 | |||
31 | static_logic = Lingo2StaticLogic() | ||
32 | player_logic: Lingo2PlayerLogic | ||
33 | |||
34 | def generate_early(self): | ||
35 | self.player_logic = Lingo2PlayerLogic(self) | ||
36 | |||
37 | def create_regions(self): | ||
38 | create_regions(self) | ||
diff --git a/apworld/locations.py b/apworld/locations.py new file mode 100644 index 0000000..818be39 --- /dev/null +++ b/apworld/locations.py | |||
@@ -0,0 +1,5 @@ | |||
1 | from BaseClasses import Location | ||
2 | |||
3 | |||
4 | class Lingo2Location(Location): | ||
5 | game: str = "Lingo 2" \ No newline at end of file | ||
diff --git a/apworld/options.py b/apworld/options.py new file mode 100644 index 0000000..f33f5af --- /dev/null +++ b/apworld/options.py | |||
@@ -0,0 +1,8 @@ | |||
1 | from dataclasses import dataclass | ||
2 | |||
3 | from Options import PerGameCommonOptions | ||
4 | |||
5 | |||
6 | @dataclass | ||
7 | class Lingo2Options(PerGameCommonOptions): | ||
8 | pass | ||
diff --git a/apworld/player_logic.py b/apworld/player_logic.py new file mode 100644 index 0000000..f54573f --- /dev/null +++ b/apworld/player_logic.py | |||
@@ -0,0 +1,24 @@ | |||
1 | from typing import TYPE_CHECKING, NamedTuple | ||
2 | |||
3 | if TYPE_CHECKING: | ||
4 | from . import Lingo2World | ||
5 | |||
6 | |||
7 | class PlayerLocation(NamedTuple): | ||
8 | name: str | ||
9 | code: int | None | ||
10 | |||
11 | |||
12 | class Lingo2PlayerLogic: | ||
13 | locations_by_room: dict[int, list[PlayerLocation]] | ||
14 | |||
15 | def __init__(self, world: "Lingo2World"): | ||
16 | self.locations_by_room = {} | ||
17 | |||
18 | code = 1 | ||
19 | for door in world.static_logic.objects.doors: | ||
20 | if not door.HasField("room_id"): | ||
21 | continue | ||
22 | |||
23 | self.locations_by_room.setdefault(door.room_id, []).append(PlayerLocation(door.name, code)) | ||
24 | code += 1 | ||
diff --git a/apworld/regions.py b/apworld/regions.py new file mode 100644 index 0000000..24c2281 --- /dev/null +++ b/apworld/regions.py | |||
@@ -0,0 +1,28 @@ | |||
1 | from typing import TYPE_CHECKING | ||
2 | |||
3 | from BaseClasses import Region | ||
4 | from .locations import Lingo2Location | ||
5 | |||
6 | if TYPE_CHECKING: | ||
7 | from . import Lingo2World | ||
8 | |||
9 | |||
10 | def create_region(room, world: "Lingo2World") -> Region: | ||
11 | new_region = Region(room.name, world.player, world.multiworld) | ||
12 | |||
13 | for location in world.player_logic.locations_by_room.get(room.id, {}): | ||
14 | new_location = Lingo2Location(world.player, location.name, location.code, new_region) | ||
15 | new_region.locations.append(new_location) | ||
16 | |||
17 | return new_region | ||
18 | |||
19 | |||
20 | def create_regions(world: "Lingo2World"): | ||
21 | regions = { | ||
22 | "Menu": Region("Menu", world.player, world.multiworld) | ||
23 | } | ||
24 | |||
25 | for room in world.static_logic.objects.rooms: | ||
26 | regions[room.name] = create_region(room, world) | ||
27 | |||
28 | world.multiworld.regions += regions.values() | ||
diff --git a/apworld/requirements.txt b/apworld/requirements.txt new file mode 100644 index 0000000..b701d11 --- /dev/null +++ b/apworld/requirements.txt | |||
@@ -0,0 +1 @@ | |||
protobuf>=5.29.3 \ No newline at end of file | |||
diff --git a/apworld/static_logic.py b/apworld/static_logic.py new file mode 100644 index 0000000..6c38f1f --- /dev/null +++ b/apworld/static_logic.py | |||
@@ -0,0 +1,9 @@ | |||
1 | from .generated import data_pb2 as data_pb2 | ||
2 | import pkgutil | ||
3 | |||
4 | class Lingo2StaticLogic: | ||
5 | def __init__(self): | ||
6 | file = pkgutil.get_data(__name__, "generated/data.binpb") | ||
7 | |||
8 | self.objects = data_pb2.AllObjects() | ||
9 | self.objects.ParseFromString(bytearray(file)) | ||
diff --git a/data/maps/the_entry/doors.txtpb b/data/maps/the_entry/doors.txtpb index c43020c..0ff0797 100644 --- a/data/maps/the_entry/doors.txtpb +++ b/data/maps/the_entry/doors.txtpb | |||
@@ -3,12 +3,14 @@ doors { | |||
3 | type: STANDARD | 3 | type: STANDARD |
4 | receivers: "Components/Doors/side_1" | 4 | receivers: "Components/Doors/side_1" |
5 | panels { room: "Starting Room" name: "TRICK" } | 5 | panels { room: "Starting Room" name: "TRICK" } |
6 | location_room: "Starting Room" | ||
6 | } | 7 | } |
7 | doors { | 8 | doors { |
8 | name: "Link Area Entrance" | 9 | name: "Link Area Entrance" |
9 | type: STANDARD | 10 | type: STANDARD |
10 | receivers: "Components/Doors/side_2" | 11 | receivers: "Components/Doors/side_2" |
11 | panels { room: "Trick Room" name: "INK" answer: "link" } | 12 | panels { room: "Trick Room" name: "INK" answer: "link" } |
13 | location_room: "Trick Room" | ||
12 | } | 14 | } |
13 | # side_3 is vanilla because I don't think it's real? | 15 | # side_3 is vanilla because I don't think it's real? |
14 | doors { | 16 | doors { |
@@ -16,12 +18,14 @@ doors { | |||
16 | type: STANDARD | 18 | type: STANDARD |
17 | receivers: "Components/Doors/side_4" | 19 | receivers: "Components/Doors/side_4" |
18 | panels { room: "Starting Room" name: "TRICK" answer: "treat" } | 20 | panels { room: "Starting Room" name: "TRICK" answer: "treat" } |
21 | location_room: "Starting Room" | ||
19 | } | 22 | } |
20 | doors { | 23 | doors { |
21 | name: "Second Room Right Door" | 24 | name: "Second Room Right Door" |
22 | type: STANDARD | 25 | type: STANDARD |
23 | receivers: "Components/Doors/second_right" | 26 | receivers: "Components/Doors/second_right" |
24 | panels { room: "Starting Room" name: "HINT" } | 27 | panels { room: "Starting Room" name: "HINT" } |
28 | location_room: "Starting Room" | ||
25 | } | 29 | } |
26 | doors { | 30 | doors { |
27 | name: "Red Alcove Exit" | 31 | name: "Red Alcove Exit" |
@@ -29,6 +33,7 @@ doors { | |||
29 | receivers: "Components/Doors/second_right2" | 33 | receivers: "Components/Doors/second_right2" |
30 | panels { room: "Red Alcove" name: "DEAD" } | 34 | panels { room: "Red Alcove" name: "DEAD" } |
31 | panels { room: "Red Alcove" name: "BROW" } | 35 | panels { room: "Red Alcove" name: "BROW" } |
36 | location_room: "Red Alcove" | ||
32 | } | 37 | } |
33 | doors { | 38 | doors { |
34 | name: "Four Corner Panels" | 39 | name: "Four Corner Panels" |
@@ -43,6 +48,7 @@ doors { | |||
43 | type: STANDARD | 48 | type: STANDARD |
44 | receivers: "Components/Doors/second_right11" | 49 | receivers: "Components/Doors/second_right11" |
45 | panels { room: "Least Blue Last" name: "CORNERS" } | 50 | panels { room: "Least Blue Last" name: "CORNERS" } |
51 | location_room: "Least Blue Last" | ||
46 | } | 52 | } |
47 | doors { | 53 | doors { |
48 | name: "Blue Alcove Exit" | 54 | name: "Blue Alcove Exit" |
@@ -50,6 +56,7 @@ doors { | |||
50 | receivers: "Components/Doors/second_right3" | 56 | receivers: "Components/Doors/second_right3" |
51 | panels { room: "Blue Alcove" name: "BLUE" } | 57 | panels { room: "Blue Alcove" name: "BLUE" } |
52 | panels { room: "Blue Alcove" name: "ARMY" } | 58 | panels { room: "Blue Alcove" name: "ARMY" } |
59 | location_room: "Blue Alcove" | ||
53 | } | 60 | } |
54 | doors { | 61 | doors { |
55 | name: "Rabbithole Door" | 62 | name: "Rabbithole Door" |
@@ -57,6 +64,7 @@ doors { | |||
57 | receivers: "Components/Doors/second_right8" | 64 | receivers: "Components/Doors/second_right8" |
58 | panels { room: "Wrath Room" name: "RABBIT" } | 65 | panels { room: "Wrath Room" name: "RABBIT" } |
59 | panels { room: "Wrath Room" name: "HOLE" } | 66 | panels { room: "Wrath Room" name: "HOLE" } |
67 | location_room: "Wrath Room" | ||
60 | } | 68 | } |
61 | # second_right is vanilla because it's like LOST door. | 69 | # second_right is vanilla because it's like LOST door. |
62 | doors { | 70 | doors { |
@@ -65,18 +73,21 @@ doors { | |||
65 | receivers: "Components/Doors/second_right5" | 73 | receivers: "Components/Doors/second_right5" |
66 | receivers: "Components/Doors/second_right10" | 74 | receivers: "Components/Doors/second_right10" |
67 | panels { room: "Red Blue Halls" name: "CENTER DAY" } | 75 | panels { room: "Red Blue Halls" name: "CENTER DAY" } |
76 | location_room: "Red Blue Halls" | ||
68 | } | 77 | } |
69 | doors { | 78 | doors { |
70 | name: "Scarf Door" | 79 | name: "Scarf Door" |
71 | type: STANDARD | 80 | type: STANDARD |
72 | receivers: "Components/Doors/second_right6" | 81 | receivers: "Components/Doors/second_right6" |
73 | panels { room: "Red Blue Halls" name: "RAIN WOMAN" } | 82 | panels { room: "Red Blue Halls" name: "RAIN WOMAN" } |
83 | location_room: "Red Blue Halls" | ||
74 | } | 84 | } |
75 | doors { | 85 | doors { |
76 | name: "Blue Alcove Entrance" | 86 | name: "Blue Alcove Entrance" |
77 | type: STANDARD | 87 | type: STANDARD |
78 | receivers: "Components/Doors/second_right9" | 88 | receivers: "Components/Doors/second_right9" |
79 | panels { room: "Wrath Room" name: "CORN" } | 89 | panels { room: "Wrath Room" name: "CORN" } |
90 | location_room: "Wrath Room" | ||
80 | } | 91 | } |
81 | doors { | 92 | doors { |
82 | name: "Second Room Left Door" | 93 | name: "Second Room Left Door" |
@@ -84,36 +95,42 @@ doors { | |||
84 | receivers: "Components/Doors/second_left" | 95 | receivers: "Components/Doors/second_left" |
85 | # There's also the special behavior with returning from The Digital. | 96 | # There's also the special behavior with returning from The Digital. |
86 | panels { room: "Starting Room" name: "THIN" } | 97 | panels { room: "Starting Room" name: "THIN" } |
98 | location_room: "Starting Room" | ||
87 | } | 99 | } |
88 | doors { | 100 | doors { |
89 | name: "Flipped Second Room Right Door" | 101 | name: "Flipped Second Room Right Door" |
90 | type: STANDARD | 102 | type: STANDARD |
91 | receivers: "Components/Doors/second_left_top" | 103 | receivers: "Components/Doors/second_left_top" |
92 | panels { room: "Flipped Second Room" name: "SLENDER" } | 104 | panels { room: "Flipped Second Room" name: "SLENDER" } |
105 | location_room: "Flipped Second Room" | ||
93 | } | 106 | } |
94 | doors { | 107 | doors { |
95 | name: "Flipped Second Room Left Door" | 108 | name: "Flipped Second Room Left Door" |
96 | type: STANDARD | 109 | type: STANDARD |
97 | receivers: "Components/Doors/second_right_top" | 110 | receivers: "Components/Doors/second_right_top" |
98 | panels { room: "Flipped Second Room" name: "CLUE" } | 111 | panels { room: "Flipped Second Room" name: "CLUE" } |
112 | location_room: "Flipped Second Room" | ||
99 | } | 113 | } |
100 | doors { | 114 | doors { |
101 | name: "Right Eye Entrance" | 115 | name: "Right Eye Entrance" |
102 | type: STANDARD | 116 | type: STANDARD |
103 | receivers: "Components/Doors/third_right" | 117 | receivers: "Components/Doors/third_right" |
104 | panels { room: "Trick Room" name: "INK" } | 118 | panels { room: "Trick Room" name: "INK" } |
119 | location_room: "Trick Room" | ||
105 | } | 120 | } |
106 | doors { | 121 | doors { |
107 | name: "Red Blue Area Left Door" | 122 | name: "Red Blue Area Left Door" |
108 | type: STANDARD | 123 | type: STANDARD |
109 | receivers: "Components/Doors/fourth_right" | 124 | receivers: "Components/Doors/fourth_right" |
110 | panels { room: "Right Eye" name: "WANDER" } | 125 | panels { room: "Right Eye" name: "WANDER" } |
126 | location_room: "Right Eye" | ||
111 | } | 127 | } |
112 | doors { | 128 | doors { |
113 | name: "Red Blue Area Right Door" | 129 | name: "Red Blue Area Right Door" |
114 | type: ITEM_ONLY | 130 | type: ITEM_ONLY |
115 | receivers: "Components/Doors/fifth_right" | 131 | receivers: "Components/Doors/fifth_right" |
116 | panels { room: "Right Eye" name: "WANDER" } | 132 | panels { room: "Right Eye" name: "WANDER" } |
133 | location_room: "Right Eye" | ||
117 | } | 134 | } |
118 | # Components/Doors/back_left_1, _3, _4, _6 are vanilla because they're nothing. | 135 | # Components/Doors/back_left_1, _3, _4, _6 are vanilla because they're nothing. |
119 | doors { | 136 | doors { |
@@ -122,12 +139,14 @@ doors { | |||
122 | receivers: "Components/Doors/back_left_2" | 139 | receivers: "Components/Doors/back_left_2" |
123 | panels { room: "Colored Doors Area" name: "OPEN" answer: "orange" } | 140 | panels { room: "Colored Doors Area" name: "OPEN" answer: "orange" } |
124 | # "wall" is supposed to also work. idk man | 141 | # "wall" is supposed to also work. idk man |
142 | location_room: "Colored Doors Area" | ||
125 | } | 143 | } |
126 | doors { | 144 | doors { |
127 | name: "Lime Room Entrance" | 145 | name: "Lime Room Entrance" |
128 | type: STANDARD | 146 | type: STANDARD |
129 | receivers: "Components/Doors/back_left_5" | 147 | receivers: "Components/Doors/back_left_5" |
130 | panels { room: "Ctrl Tutorial" name: "RIGHT" } | 148 | panels { room: "Ctrl Tutorial" name: "RIGHT" } |
149 | location_room: "Ctrl Tutorial" | ||
131 | } | 150 | } |
132 | doors { | 151 | doors { |
133 | name: "Revitalized Entrance" | 152 | name: "Revitalized Entrance" |
@@ -136,6 +155,7 @@ doors { | |||
136 | receivers: "Components/Doors/back_left_9" | 155 | receivers: "Components/Doors/back_left_9" |
137 | panels { room: "Lime Room" name: "HIDE" } | 156 | panels { room: "Lime Room" name: "HIDE" } |
138 | panels { room: "Lime Room" name: "SEEK" } | 157 | panels { room: "Lime Room" name: "SEEK" } |
158 | location_room: "Lime Room" | ||
139 | } | 159 | } |
140 | doors { | 160 | doors { |
141 | name: "Control Center White Door" | 161 | name: "Control Center White Door" |
@@ -150,24 +170,28 @@ doors { | |||
150 | type: STANDARD | 170 | type: STANDARD |
151 | receivers: "Components/Doors/Entry/entry_proxied_2" | 171 | receivers: "Components/Doors/Entry/entry_proxied_2" |
152 | panels { room: "Starting Room" name: "HI" answer: "bye" } | 172 | panels { room: "Starting Room" name: "HI" answer: "bye" } |
173 | location_room: "Starting Room" | ||
153 | } | 174 | } |
154 | doors { | 175 | doors { |
155 | name: "Composite Room Entrance" | 176 | name: "Composite Room Entrance" |
156 | type: STANDARD | 177 | type: STANDARD |
157 | receivers: "Components/Doors/Entry/entry_proxied_3" | 178 | receivers: "Components/Doors/Entry/entry_proxied_3" |
158 | panels { room: "Starting Room" name: "HI" answer: "hidden" } | 179 | panels { room: "Starting Room" name: "HI" answer: "hidden" } |
180 | location_room: "Starting Room" | ||
159 | } | 181 | } |
160 | doors { | 182 | doors { |
161 | name: "Flip Area Entrance" | 183 | name: "Flip Area Entrance" |
162 | type: STANDARD | 184 | type: STANDARD |
163 | receivers: "Components/Doors/Entry/entry_proxied_4" | 185 | receivers: "Components/Doors/Entry/entry_proxied_4" |
164 | panels { room: "Starting Room" name: "HI" answer: "high" } | 186 | panels { room: "Starting Room" name: "HI" answer: "high" } |
187 | location_room: "Starting Room" | ||
165 | } | 188 | } |
166 | doors { | 189 | doors { |
167 | name: "Daedalus Entrance" | 190 | name: "Daedalus Entrance" |
168 | type: STANDARD | 191 | type: STANDARD |
169 | receivers: "Components/Doors/Entry/entry_proxied_5" | 192 | receivers: "Components/Doors/Entry/entry_proxied_5" |
170 | panels { room: "Starting Room" name: "HI" answer: "hide" } | 193 | panels { room: "Starting Room" name: "HI" answer: "hide" } |
194 | location_room: "Starting Room" | ||
171 | } | 195 | } |
172 | doors { | 196 | doors { |
173 | name: "Repetitive Entrance" | 197 | name: "Repetitive Entrance" |
@@ -180,12 +204,14 @@ doors { | |||
180 | type: STANDARD | 204 | type: STANDARD |
181 | receivers: "Components/Doors/Entry/entry_proxied_6" | 205 | receivers: "Components/Doors/Entry/entry_proxied_6" |
182 | panels { room: "Shop Entrance" name: "TURN" } | 206 | panels { room: "Shop Entrance" name: "TURN" } |
207 | location_room: "Shop Entrance" | ||
183 | } | 208 | } |
184 | doors { | 209 | doors { |
185 | name: "Liberated Entrance" | 210 | name: "Liberated Entrance" |
186 | type: STANDARD | 211 | type: STANDARD |
187 | receivers: "Components/Doors/Entry/entry_proxied_10" | 212 | receivers: "Components/Doors/Entry/entry_proxied_10" |
188 | panels { room: "Flipped Pyramid Area" name: "TURN (1)" } | 213 | panels { room: "Flipped Pyramid Area" name: "TURN (1)" } |
214 | location_room: "Flipped Pyramid Area" | ||
189 | } | 215 | } |
190 | doors { | 216 | doors { |
191 | name: "Flipped Pyramid Area Entrance" | 217 | name: "Flipped Pyramid Area Entrance" |
@@ -198,24 +224,28 @@ doors { | |||
198 | type: STANDARD | 224 | type: STANDARD |
199 | receivers: "Components/Doors/Entry/entry_proxied_11" | 225 | receivers: "Components/Doors/Entry/entry_proxied_11" |
200 | panels { room: "Flipped Pyramid Area" name: "TURN (2)" } | 226 | panels { room: "Flipped Pyramid Area" name: "TURN (2)" } |
227 | location_room: "Flipped Pyramid Area" | ||
201 | } | 228 | } |
202 | doors { | 229 | doors { |
203 | name: "Parthenon Entrance" | 230 | name: "Parthenon Entrance" |
204 | type: STANDARD | 231 | type: STANDARD |
205 | receivers: "Components/Doors/Entry/entry_proxied_7" | 232 | receivers: "Components/Doors/Entry/entry_proxied_7" |
206 | panels { room: "Parthenon Return" name: "RETURN" } | 233 | panels { room: "Parthenon Return" name: "RETURN" } |
234 | location_room: "Parthenon Return" | ||
207 | } | 235 | } |
208 | doors { | 236 | doors { |
209 | name: "Colored Doors Area Entrance" | 237 | name: "Colored Doors Area Entrance" |
210 | type: ITEM_ONLY | 238 | type: ITEM_ONLY |
211 | receivers: "Components/Doors/Entry/entry_proxied_8" | 239 | receivers: "Components/Doors/Entry/entry_proxied_8" |
212 | panels { room: "Parthenon Return" name: "RETURN" } | 240 | panels { room: "Parthenon Return" name: "RETURN" } |
241 | location_room: "Parthenon Return" | ||
213 | } | 242 | } |
214 | doors { | 243 | doors { |
215 | name: "D Room Entrance" | 244 | name: "D Room Entrance" |
216 | type: STANDARD | 245 | type: STANDARD |
217 | receivers: "Components/Doors/Entry/d_1" | 246 | receivers: "Components/Doors/Entry/d_1" |
218 | panels { room: "Starting Room" name: "THAN" } | 247 | panels { room: "Starting Room" name: "THAN" } |
248 | location_room: "Starting Room" | ||
219 | } | 249 | } |
220 | doors { | 250 | doors { |
221 | name: "Near D Room Painting" | 251 | name: "Near D Room Painting" |
@@ -243,6 +273,7 @@ doors { | |||
243 | type: STANDARD | 273 | type: STANDARD |
244 | receivers: "Components/Doors/Entry/entry_return_1" | 274 | receivers: "Components/Doors/Entry/entry_return_1" |
245 | panels { room: "Gallery Return" name: "RETURN" } | 275 | panels { room: "Gallery Return" name: "RETURN" } |
276 | location_room: "Gallery Return" | ||
246 | } | 277 | } |
247 | # entry_front_1 - _6 are part of the vanilla intro. | 278 | # entry_front_1 - _6 are part of the vanilla intro. |
248 | doors { | 279 | doors { |
@@ -251,6 +282,7 @@ doors { | |||
251 | receivers: "Components/Doors/Entry/entry_front_7" | 282 | receivers: "Components/Doors/Entry/entry_front_7" |
252 | receivers: "Components/Doors/Entry/entry_front_8" | 283 | receivers: "Components/Doors/Entry/entry_front_8" |
253 | panels { room: "Trick Room" name: "INK" } | 284 | panels { room: "Trick Room" name: "INK" } |
285 | location_room: "Trick Room" | ||
254 | } | 286 | } |
255 | doors { | 287 | doors { |
256 | name: "Least Blue Last Panels" | 288 | name: "Least Blue Last Panels" |
@@ -271,10 +303,12 @@ doors { | |||
271 | type: STANDARD | 303 | type: STANDARD |
272 | move_paintings { room: "Right Eye" name: "PSYCHIC" } | 304 | move_paintings { room: "Right Eye" name: "PSYCHIC" } |
273 | panels { room: "Right Eye" name: "FAINT" } | 305 | panels { room: "Right Eye" name: "FAINT" } |
306 | location_room: "Right Eye" | ||
274 | } | 307 | } |
275 | doors { | 308 | doors { |
276 | name: "Third Eye Painting" | 309 | name: "Third Eye Painting" |
277 | type: STANDARD | 310 | type: STANDARD |
278 | move_paintings { room: "Eye Room" name: "GALLERY" } | 311 | move_paintings { room: "Eye Room" name: "GALLERY" } |
279 | panels { room: "Eye Room" name: "I" } | 312 | panels { room: "Eye Room" name: "I" } |
313 | location_room: "Eye Room" | ||
280 | } \ No newline at end of file | 314 | } \ No newline at end of file |
diff --git a/proto/data.proto b/proto/data.proto index 37d59f3..3417c4c 100644 --- a/proto/data.proto +++ b/proto/data.proto | |||
@@ -24,6 +24,7 @@ message Connection { | |||
24 | message Door { | 24 | message Door { |
25 | uint64 id = 1; | 25 | uint64 id = 1; |
26 | uint64 map_id = 9; | 26 | uint64 map_id = 9; |
27 | uint64 room_id = 10; | ||
27 | string name = 2; | 28 | string name = 2; |
28 | 29 | ||
29 | repeated string receivers = 3; | 30 | repeated string receivers = 3; |
@@ -88,6 +89,7 @@ message Room { | |||
88 | repeated uint64 paintings = 5; | 89 | repeated uint64 paintings = 5; |
89 | repeated Letter letters = 6; | 90 | repeated Letter letters = 6; |
90 | repeated uint64 ports = 7; | 91 | repeated uint64 ports = 7; |
92 | repeated uint64 doors = 9; | ||
91 | } | 93 | } |
92 | 94 | ||
93 | message Map { | 95 | message Map { |
diff --git a/proto/human.proto b/proto/human.proto index 49eaccd..d5d03ff 100644 --- a/proto/human.proto +++ b/proto/human.proto | |||
@@ -72,6 +72,7 @@ message HumanDoor { | |||
72 | repeated string switches = 7; | 72 | repeated string switches = 7; |
73 | 73 | ||
74 | DoorType type = 4; | 74 | DoorType type = 4; |
75 | string location_room = 5; | ||
75 | } | 76 | } |
76 | 77 | ||
77 | message HumanDoors { | 78 | message HumanDoors { |
diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index e63f940..1dcd109 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp | |||
@@ -215,6 +215,14 @@ class DataPacker { | |||
215 | container_.FindOrAddDoor(current_map_name, h_door.name(), std::nullopt); | 215 | container_.FindOrAddDoor(current_map_name, h_door.name(), std::nullopt); |
216 | Door& door = *container_.all_objects().mutable_doors(door_id); | 216 | Door& door = *container_.all_objects().mutable_doors(door_id); |
217 | 217 | ||
218 | if (h_door.has_location_room()) { | ||
219 | door.set_room_id(container_.FindOrAddRoom( | ||
220 | current_map_name, h_door.location_room(), std::nullopt)); | ||
221 | |||
222 | Room& room = *container_.all_objects().mutable_rooms(door.room_id()); | ||
223 | room.add_doors(door_id); | ||
224 | } | ||
225 | |||
218 | std::copy( | 226 | std::copy( |
219 | h_door.receivers().begin(), h_door.receivers().end(), | 227 | h_door.receivers().begin(), h_door.receivers().end(), |
220 | google::protobuf::RepeatedFieldBackInserter(door.mutable_receivers())); | 228 | google::protobuf::RepeatedFieldBackInserter(door.mutable_receivers())); |
diff --git a/vcpkg.json b/vcpkg.json index 4b3fb5d..cd12788 100644 --- a/vcpkg.json +++ b/vcpkg.json | |||
@@ -1,5 +1,11 @@ | |||
1 | { | 1 | { |
2 | "dependencies": [ | 2 | "dependencies": [ |
3 | "protobuf" | 3 | "protobuf" |
4 | ], | ||
5 | "overrides": [ | ||
6 | { | ||
7 | "name": "protobuf", | ||
8 | "version": "5.29.3" | ||
9 | } | ||
4 | ] | 10 | ] |
5 | } | 11 | } \ No newline at end of file |