diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-11 12:03:39 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-11 12:03:39 -0400 |
commit | 4e56e7681c0769dd247c0512a682a067426436bc (patch) | |
tree | d10ed9dbc920199df2cdf33b65df48328079baf0 | |
parent | 839cf72809a5d7aa65002c1b93d78c588def1210 (diff) | |
download | lingo2-archipelago-4e56e7681c0769dd247c0512a682a067426436bc.tar.gz lingo2-archipelago-4e56e7681c0769dd247c0512a682a067426436bc.tar.bz2 lingo2-archipelago-4e56e7681c0769dd247c0512a682a067426436bc.zip |
Add gravity to paintings/ports
-rw-r--r-- | data/maps/the_entry/rooms/Flipped Link Area.txtpb | 4 | ||||
-rw-r--r-- | data/maps/the_entry/rooms/Flipped Second Room.txtpb | 3 | ||||
-rw-r--r-- | proto/common.proto | 11 | ||||
-rw-r--r-- | proto/data.proto | 3 | ||||
-rw-r--r-- | proto/human.proto | 3 | ||||
-rw-r--r-- | tools/datapacker/main.cpp | 8 |
6 files changed, 25 insertions, 7 deletions
diff --git a/data/maps/the_entry/rooms/Flipped Link Area.txtpb b/data/maps/the_entry/rooms/Flipped Link Area.txtpb index b189c57..2e37e3a 100644 --- a/data/maps/the_entry/rooms/Flipped Link Area.txtpb +++ b/data/maps/the_entry/rooms/Flipped Link Area.txtpb | |||
@@ -11,13 +11,13 @@ paintings { | |||
11 | name: "NEAR" | 11 | name: "NEAR" |
12 | path: "Components/Paintings/aches2" | 12 | path: "Components/Paintings/aches2" |
13 | orientation: "north" | 13 | orientation: "north" |
14 | flipped: true | 14 | gravity: Y_PLUS |
15 | display_name: "Flipper Near Painting" | 15 | display_name: "Flipper Near Painting" |
16 | } | 16 | } |
17 | paintings { | 17 | paintings { |
18 | name: "FAR" | 18 | name: "FAR" |
19 | path: "Components/Paintings/aches4" | 19 | path: "Components/Paintings/aches4" |
20 | orientation: "south" | 20 | orientation: "south" |
21 | flipped: true | 21 | gravity: Y_PLUS |
22 | display_name: "Flipped Far Painting" | 22 | display_name: "Flipped Far Painting" |
23 | } \ No newline at end of file | 23 | } \ No newline at end of file |
diff --git a/data/maps/the_entry/rooms/Flipped Second Room.txtpb b/data/maps/the_entry/rooms/Flipped Second Room.txtpb index 339ea64..229f035 100644 --- a/data/maps/the_entry/rooms/Flipped Second Room.txtpb +++ b/data/maps/the_entry/rooms/Flipped Second Room.txtpb | |||
@@ -18,12 +18,13 @@ paintings { | |||
18 | name: "EYE" | 18 | name: "EYE" |
19 | path: "Components/Paintings/eyes" | 19 | path: "Components/Paintings/eyes" |
20 | orientation: "north" | 20 | orientation: "north" |
21 | flipped: true | 21 | gravity: Y_PLUS |
22 | display_name: "Eye Painting" | 22 | display_name: "Eye Painting" |
23 | } | 23 | } |
24 | ports { | 24 | ports { |
25 | name: "FOUR" | 25 | name: "FOUR" |
26 | path: "Components/Warps/worldport9" | 26 | path: "Components/Warps/worldport9" |
27 | orientation: "south" | 27 | orientation: "south" |
28 | gravity: Y_PLUS | ||
28 | required_door { name: "Flipped Second Room Right Door" } | 29 | required_door { name: "Flipped Second Room Right Door" } |
29 | } \ No newline at end of file | 30 | } \ No newline at end of file |
diff --git a/proto/common.proto b/proto/common.proto index e300e94..e37f670 100644 --- a/proto/common.proto +++ b/proto/common.proto | |||
@@ -25,3 +25,14 @@ enum DoorType { | |||
25 | // This door is never an item, and is a location as long as panelsanity is not on. | 25 | // This door is never an item, and is a location as long as panelsanity is not on. |
26 | LOCATION_ONLY = 5; | 26 | LOCATION_ONLY = 5; |
27 | } | 27 | } |
28 | |||
29 | enum AxisDirection { | ||
30 | AXIS_DIRECTION_UNKNOWN = 0; | ||
31 | |||
32 | X_PLUS = 1; | ||
33 | X_MINUS = 2; | ||
34 | Y_PLUS = 3; | ||
35 | Y_MINUS = 4; | ||
36 | Z_PLUS = 5; | ||
37 | Z_MINUS = 6; | ||
38 | } | ||
diff --git a/proto/data.proto b/proto/data.proto index fd38cfd..b590454 100644 --- a/proto/data.proto +++ b/proto/data.proto | |||
@@ -75,7 +75,7 @@ message Painting { | |||
75 | string orientation = 3; | 75 | string orientation = 3; |
76 | bool move = 6; | 76 | bool move = 6; |
77 | bool enter_only = 7; | 77 | bool enter_only = 7; |
78 | bool flipped = 8; | 78 | AxisDirection gravity = 8 [default = Y_MINUS]; |
79 | bool exit_only = 11; | 79 | bool exit_only = 11; |
80 | 80 | ||
81 | uint64 required_door = 5; | 81 | uint64 required_door = 5; |
@@ -88,6 +88,7 @@ message Port { | |||
88 | 88 | ||
89 | string path = 4; | 89 | string path = 4; |
90 | string orientation = 5; | 90 | string orientation = 5; |
91 | AxisDirection gravity = 7 [default = Y_MINUS]; | ||
91 | 92 | ||
92 | uint64 required_door = 6; | 93 | uint64 required_door = 6; |
93 | } | 94 | } |
diff --git a/proto/human.proto b/proto/human.proto index 7d61fcb..858c88f 100644 --- a/proto/human.proto +++ b/proto/human.proto | |||
@@ -117,7 +117,7 @@ message HumanPainting { | |||
117 | string orientation = 3; | 117 | string orientation = 3; |
118 | bool move = 6; | 118 | bool move = 6; |
119 | bool enter_only = 7; | 119 | bool enter_only = 7; |
120 | bool flipped = 8; | 120 | AxisDirection gravity = 8 [default = Y_MINUS]; |
121 | bool exit_only = 9; | 121 | bool exit_only = 9; |
122 | 122 | ||
123 | DoorIdentifier required_door = 5; | 123 | DoorIdentifier required_door = 5; |
@@ -128,6 +128,7 @@ message HumanPort { | |||
128 | string path = 2; | 128 | string path = 2; |
129 | 129 | ||
130 | string orientation = 3; | 130 | string orientation = 3; |
131 | AxisDirection gravity = 5 [default = Y_MINUS]; | ||
131 | 132 | ||
132 | DoorIdentifier required_door = 4; | 133 | DoorIdentifier required_door = 4; |
133 | } | 134 | } |
diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index 7e7f7f7..d3908b4 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp | |||
@@ -169,8 +169,8 @@ class DataPacker { | |||
169 | painting.set_display_name(h_painting.display_name()); | 169 | painting.set_display_name(h_painting.display_name()); |
170 | painting.set_orientation(h_painting.orientation()); | 170 | painting.set_orientation(h_painting.orientation()); |
171 | 171 | ||
172 | if (h_painting.has_flipped()) { | 172 | if (h_painting.has_gravity()) { |
173 | painting.set_flipped(h_painting.flipped()); | 173 | painting.set_gravity(h_painting.gravity()); |
174 | } | 174 | } |
175 | 175 | ||
176 | if (h_painting.has_move()) { | 176 | if (h_painting.has_move()) { |
@@ -208,6 +208,10 @@ class DataPacker { | |||
208 | port.set_path(h_port.path()); | 208 | port.set_path(h_port.path()); |
209 | port.set_orientation(h_port.orientation()); | 209 | port.set_orientation(h_port.orientation()); |
210 | 210 | ||
211 | if (h_port.has_gravity()) { | ||
212 | port.set_gravity(h_port.gravity()); | ||
213 | } | ||
214 | |||
211 | if (h_port.has_required_door()) { | 215 | if (h_port.has_required_door()) { |
212 | std::optional<std::string> map_name = | 216 | std::optional<std::string> map_name = |
213 | h_port.required_door().has_map() | 217 | h_port.required_door().has_map() |