From 4e56e7681c0769dd247c0512a682a067426436bc Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 11 Aug 2025 12:03:39 -0400 Subject: Add gravity to paintings/ports --- data/maps/the_entry/rooms/Flipped Link Area.txtpb | 4 ++-- data/maps/the_entry/rooms/Flipped Second Room.txtpb | 3 ++- proto/common.proto | 11 +++++++++++ proto/data.proto | 3 ++- proto/human.proto | 3 ++- 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 { name: "NEAR" path: "Components/Paintings/aches2" orientation: "north" - flipped: true + gravity: Y_PLUS display_name: "Flipper Near Painting" } paintings { name: "FAR" path: "Components/Paintings/aches4" orientation: "south" - flipped: true + gravity: Y_PLUS display_name: "Flipped Far Painting" } \ 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 { name: "EYE" path: "Components/Paintings/eyes" orientation: "north" - flipped: true + gravity: Y_PLUS display_name: "Eye Painting" } ports { name: "FOUR" path: "Components/Warps/worldport9" orientation: "south" + gravity: Y_PLUS required_door { name: "Flipped Second Room Right Door" } } \ 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 { // This door is never an item, and is a location as long as panelsanity is not on. LOCATION_ONLY = 5; } + +enum AxisDirection { + AXIS_DIRECTION_UNKNOWN = 0; + + X_PLUS = 1; + X_MINUS = 2; + Y_PLUS = 3; + Y_MINUS = 4; + Z_PLUS = 5; + Z_MINUS = 6; +} 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 { string orientation = 3; bool move = 6; bool enter_only = 7; - bool flipped = 8; + AxisDirection gravity = 8 [default = Y_MINUS]; bool exit_only = 11; uint64 required_door = 5; @@ -88,6 +88,7 @@ message Port { string path = 4; string orientation = 5; + AxisDirection gravity = 7 [default = Y_MINUS]; uint64 required_door = 6; } 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 { string orientation = 3; bool move = 6; bool enter_only = 7; - bool flipped = 8; + AxisDirection gravity = 8 [default = Y_MINUS]; bool exit_only = 9; DoorIdentifier required_door = 5; @@ -128,6 +128,7 @@ message HumanPort { string path = 2; string orientation = 3; + AxisDirection gravity = 5 [default = Y_MINUS]; DoorIdentifier required_door = 4; } 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 { painting.set_display_name(h_painting.display_name()); painting.set_orientation(h_painting.orientation()); - if (h_painting.has_flipped()) { - painting.set_flipped(h_painting.flipped()); + if (h_painting.has_gravity()) { + painting.set_gravity(h_painting.gravity()); } if (h_painting.has_move()) { @@ -208,6 +208,10 @@ class DataPacker { port.set_path(h_port.path()); port.set_orientation(h_port.orientation()); + if (h_port.has_gravity()) { + port.set_gravity(h_port.gravity()); + } + if (h_port.has_required_door()) { std::optional map_name = h_port.required_door().has_map() -- cgit 1.4.1