From 72a33fcff5150228b72f4c24e4285f8a0e52566a Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 24 Oct 2025 15:37:28 -0400 Subject: Add white_ending flag to door --- data/maps/control_center/doors.txtpb | 16 +--------------- proto/data.proto | 2 +- proto/human.proto | 2 +- tools/datapacker/main.cpp | 4 ++-- tools/validator/human_processor.cpp | 5 ----- tools/validator/structs.h | 2 -- tools/validator/validator.cpp | 8 +------- 7 files changed, 6 insertions(+), 33 deletions(-) diff --git a/data/maps/control_center/doors.txtpb b/data/maps/control_center/doors.txtpb index cac1937..1422301 100644 --- a/data/maps/control_center/doors.txtpb +++ b/data/maps/control_center/doors.txtpb @@ -86,21 +86,7 @@ doors { doors { name: "White Ending Door" type: EVENT - # This is the only time a door depends on endings. However, it's nice to do it - # this way instead of just checking for ending room access because this lets - # us use events, which makes the playthrough more readable. - endings: "MINT" - endings: "ORANGE" - endings: "GREEN" - endings: "GRAY" - endings: "PLUM" - endings: "YELLOW" - endings: "GOLD" - endings: "BLACK" - endings: "CYAN" - endings: "PURPLE" - endings: "RED" - endings: "BLUE" + white_ending: true } doors { name: "Repetitive Entrance" diff --git a/proto/data.proto b/proto/data.proto index 0f668f2..be18100 100644 --- a/proto/data.proto +++ b/proto/data.proto @@ -149,7 +149,7 @@ message Door { repeated KeyholderAnswer keyholders = 13; repeated uint64 rooms = 14; repeated uint64 doors = 15; - repeated uint64 endings = 16; + optional bool white_ending = 16; optional bool double_letters = 18; repeated string senders = 19; diff --git a/proto/human.proto b/proto/human.proto index df33a5e..a5f7a7c 100644 --- a/proto/human.proto +++ b/proto/human.proto @@ -104,7 +104,7 @@ message HumanDoor { repeated KeyholderIdentifier keyholders = 10; repeated RoomIdentifier rooms = 11; repeated DoorIdentifier doors = 12; - repeated string endings = 13; + optional bool white_ending = 13; optional bool double_letters = 15; // Sender nodes to be added to the list of requirements for triggering the diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index e3ab100..bda4ee4 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp @@ -411,8 +411,8 @@ class DataPacker { container_.FindOrAddDoor(map_name, di.name(), current_map_name)); } - for (const std::string& ending_name : h_door.endings()) { - door.add_endings(container_.FindOrAddEnding(ending_name)); + if (h_door.has_white_ending()) { + door.set_white_ending(h_door.white_ending()); } if (h_door.has_control_center_color()) { diff --git a/tools/validator/human_processor.cpp b/tools/validator/human_processor.cpp index 5a1c095..407d951 100644 --- a/tools/validator/human_processor.cpp +++ b/tools/validator/human_processor.cpp @@ -373,11 +373,6 @@ class HumanProcessor { DoorInfo& other_door_info = info_.doors[complete_door_identifier]; other_door_info.doors_referenced_by.push_back(door_identifier); } - - for (const std::string& ei : h_door.endings()) { - EndingInfo& ending_info = info_.endings[ei]; - ending_info.doors_referenced_by.push_back(door_identifier); - } } void ProcessConnectionsFile(std::filesystem::path path, diff --git a/tools/validator/structs.h b/tools/validator/structs.h index a6787cf..51215e9 100644 --- a/tools/validator/structs.h +++ b/tools/validator/structs.h @@ -107,8 +107,6 @@ struct LetterInfo { struct EndingInfo { std::vector defined_in; bool has_id = false; - - std::vector doors_referenced_by; }; struct PanelNameInfo { diff --git a/tools/validator/validator.cpp b/tools/validator/validator.cpp index 43d842d..e1fc138 100644 --- a/tools/validator/validator.cpp +++ b/tools/validator/validator.cpp @@ -111,7 +111,7 @@ class Validator { return false; } - if (h_door.keyholders_size() > 0 || h_door.endings_size() > 0 || + if (h_door.keyholders_size() > 0 || h_door.white_ending() || h_door.complete_at() > 0) { return true; } @@ -488,12 +488,6 @@ class Validator { std::cout << "Ending " << ending_name << " has no definition, but was referenced:" << std::endl; - for (const DoorIdentifier& door_identifier : - ending_info.doors_referenced_by) { - std::cout << " DOOR " << door_identifier.ShortDebugString() - << std::endl; - } - if (ending_info.has_id) { std::cout << " An AP ID is present." << std::endl; } -- cgit 1.4.1