diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-10-24 15:37:28 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-10-24 15:37:28 -0400 |
| commit | 72a33fcff5150228b72f4c24e4285f8a0e52566a (patch) | |
| tree | e574be64d1196b236aaeab125eb6410600649a94 | |
| parent | 5322fdf9fc829566be5ec22f1f0fae0bd2d4c186 (diff) | |
| download | lingo2-archipelago-72a33fcff5150228b72f4c24e4285f8a0e52566a.tar.gz lingo2-archipelago-72a33fcff5150228b72f4c24e4285f8a0e52566a.tar.bz2 lingo2-archipelago-72a33fcff5150228b72f4c24e4285f8a0e52566a.zip | |
Add white_ending flag to door
| -rw-r--r-- | data/maps/control_center/doors.txtpb | 16 | ||||
| -rw-r--r-- | proto/data.proto | 2 | ||||
| -rw-r--r-- | proto/human.proto | 2 | ||||
| -rw-r--r-- | tools/datapacker/main.cpp | 4 | ||||
| -rw-r--r-- | tools/validator/human_processor.cpp | 5 | ||||
| -rw-r--r-- | tools/validator/structs.h | 2 | ||||
| -rw-r--r-- | 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 { | |||
| 86 | doors { | 86 | doors { |
| 87 | name: "White Ending Door" | 87 | name: "White Ending Door" |
| 88 | type: EVENT | 88 | type: EVENT |
| 89 | # This is the only time a door depends on endings. However, it's nice to do it | 89 | white_ending: true |
| 90 | # this way instead of just checking for ending room access because this lets | ||
| 91 | # us use events, which makes the playthrough more readable. | ||
| 92 | endings: "MINT" | ||
| 93 | endings: "ORANGE" | ||
| 94 | endings: "GREEN" | ||
| 95 | endings: "GRAY" | ||
| 96 | endings: "PLUM" | ||
| 97 | endings: "YELLOW" | ||
| 98 | endings: "GOLD" | ||
| 99 | endings: "BLACK" | ||
| 100 | endings: "CYAN" | ||
| 101 | endings: "PURPLE" | ||
| 102 | endings: "RED" | ||
| 103 | endings: "BLUE" | ||
| 104 | } | 90 | } |
| 105 | doors { | 91 | doors { |
| 106 | name: "Repetitive Entrance" | 92 | 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 { | |||
| 149 | repeated KeyholderAnswer keyholders = 13; | 149 | repeated KeyholderAnswer keyholders = 13; |
| 150 | repeated uint64 rooms = 14; | 150 | repeated uint64 rooms = 14; |
| 151 | repeated uint64 doors = 15; | 151 | repeated uint64 doors = 15; |
| 152 | repeated uint64 endings = 16; | 152 | optional bool white_ending = 16; |
| 153 | optional bool double_letters = 18; | 153 | optional bool double_letters = 18; |
| 154 | repeated string senders = 19; | 154 | repeated string senders = 19; |
| 155 | 155 | ||
| 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 { | |||
| 104 | repeated KeyholderIdentifier keyholders = 10; | 104 | repeated KeyholderIdentifier keyholders = 10; |
| 105 | repeated RoomIdentifier rooms = 11; | 105 | repeated RoomIdentifier rooms = 11; |
| 106 | repeated DoorIdentifier doors = 12; | 106 | repeated DoorIdentifier doors = 12; |
| 107 | repeated string endings = 13; | 107 | optional bool white_ending = 13; |
| 108 | optional bool double_letters = 15; | 108 | optional bool double_letters = 15; |
| 109 | 109 | ||
| 110 | // Sender nodes to be added to the list of requirements for triggering the | 110 | // 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 { | |||
| 411 | container_.FindOrAddDoor(map_name, di.name(), current_map_name)); | 411 | container_.FindOrAddDoor(map_name, di.name(), current_map_name)); |
| 412 | } | 412 | } |
| 413 | 413 | ||
| 414 | for (const std::string& ending_name : h_door.endings()) { | 414 | if (h_door.has_white_ending()) { |
| 415 | door.add_endings(container_.FindOrAddEnding(ending_name)); | 415 | door.set_white_ending(h_door.white_ending()); |
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | if (h_door.has_control_center_color()) { | 418 | 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 { | |||
| 373 | DoorInfo& other_door_info = info_.doors[complete_door_identifier]; | 373 | DoorInfo& other_door_info = info_.doors[complete_door_identifier]; |
| 374 | other_door_info.doors_referenced_by.push_back(door_identifier); | 374 | other_door_info.doors_referenced_by.push_back(door_identifier); |
| 375 | } | 375 | } |
| 376 | |||
| 377 | for (const std::string& ei : h_door.endings()) { | ||
| 378 | EndingInfo& ending_info = info_.endings[ei]; | ||
| 379 | ending_info.doors_referenced_by.push_back(door_identifier); | ||
| 380 | } | ||
| 381 | } | 376 | } |
| 382 | 377 | ||
| 383 | void ProcessConnectionsFile(std::filesystem::path path, | 378 | 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 { | |||
| 107 | struct EndingInfo { | 107 | struct EndingInfo { |
| 108 | std::vector<RoomIdentifier> defined_in; | 108 | std::vector<RoomIdentifier> defined_in; |
| 109 | bool has_id = false; | 109 | bool has_id = false; |
| 110 | |||
| 111 | std::vector<DoorIdentifier> doors_referenced_by; | ||
| 112 | }; | 110 | }; |
| 113 | 111 | ||
| 114 | struct PanelNameInfo { | 112 | 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 { | |||
| 111 | return false; | 111 | return false; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | if (h_door.keyholders_size() > 0 || h_door.endings_size() > 0 || | 114 | if (h_door.keyholders_size() > 0 || h_door.white_ending() || |
| 115 | h_door.complete_at() > 0) { | 115 | h_door.complete_at() > 0) { |
| 116 | return true; | 116 | return true; |
| 117 | } | 117 | } |
| @@ -488,12 +488,6 @@ class Validator { | |||
| 488 | std::cout << "Ending " << ending_name | 488 | std::cout << "Ending " << ending_name |
| 489 | << " has no definition, but was referenced:" << std::endl; | 489 | << " has no definition, but was referenced:" << std::endl; |
| 490 | 490 | ||
| 491 | for (const DoorIdentifier& door_identifier : | ||
| 492 | ending_info.doors_referenced_by) { | ||
| 493 | std::cout << " DOOR " << door_identifier.ShortDebugString() | ||
| 494 | << std::endl; | ||
| 495 | } | ||
| 496 | |||
| 497 | if (ending_info.has_id) { | 491 | if (ending_info.has_id) { |
| 498 | std::cout << " An AP ID is present." << std::endl; | 492 | std::cout << " An AP ID is present." << std::endl; |
| 499 | } | 493 | } |
