diff options
| -rw-r--r-- | data/maps/the_advanced/metadata.txtpb | 2 | ||||
| -rw-r--r-- | data/maps/the_entry/metadata.txtpb | 3 | ||||
| -rw-r--r-- | data/maps/the_sturdy/metadata.txtpb | 3 | ||||
| -rw-r--r-- | proto/human.proto | 13 | ||||
| -rw-r--r-- | tools/validator/human_processor.cpp | 4 |
5 files changed, 23 insertions, 2 deletions
| diff --git a/data/maps/the_advanced/metadata.txtpb b/data/maps/the_advanced/metadata.txtpb index 578fe72..cee10b6 100644 --- a/data/maps/the_advanced/metadata.txtpb +++ b/data/maps/the_advanced/metadata.txtpb | |||
| @@ -1,2 +1,4 @@ | |||
| 1 | display_name: "The Advanced" | 1 | display_name: "The Advanced" |
| 2 | type: GIFT_MAP | 2 | type: GIFT_MAP |
| 3 | # The map's mastery is created at runtime. | ||
| 4 | custom_nodes: "Components/Collectables/collectable" | ||
| diff --git a/data/maps/the_entry/metadata.txtpb b/data/maps/the_entry/metadata.txtpb index 0eeb29a..9536831 100644 --- a/data/maps/the_entry/metadata.txtpb +++ b/data/maps/the_entry/metadata.txtpb | |||
| @@ -11,3 +11,6 @@ excluded_nodes: "Panels/Back Left/backleft_4_proxied_1" | |||
| 11 | excluded_nodes: "Panels/Back Left/backleft_4_proxied_2" | 11 | excluded_nodes: "Panels/Back Left/backleft_4_proxied_2" |
| 12 | # This is a proxy related to the first panel and it doesn't seem useful. | 12 | # This is a proxy related to the first panel and it doesn't seem useful. |
| 13 | excluded_nodes: "Panels/Entry/entry_proxied_fake" | 13 | excluded_nodes: "Panels/Entry/entry_proxied_fake" |
| 14 | # The gift map entrance is created by the mod. | ||
| 15 | custom_nodes: "Components/GiftMapEntrance/IcelyPanel" | ||
| 16 | custom_nodes: "Components/GiftMapEntrance/Panel" | ||
| diff --git a/data/maps/the_sturdy/metadata.txtpb b/data/maps/the_sturdy/metadata.txtpb index 9f42137..624f765 100644 --- a/data/maps/the_sturdy/metadata.txtpb +++ b/data/maps/the_sturdy/metadata.txtpb | |||
| @@ -4,3 +4,6 @@ display_name: "The Sturdy" | |||
| 4 | # I don't know why there's a second copy of the rainbow. | 4 | # I don't know why there's a second copy of the rainbow. |
| 5 | #excluded_nodes: "Components/Doors/Rainbow/Hinge/rainbow" | 5 | #excluded_nodes: "Components/Doors/Rainbow/Hinge/rainbow" |
| 6 | #excluded_nodes: "Components/Doors/Rainbow/Hinge/rainbowMirrored" | 6 | #excluded_nodes: "Components/Doors/Rainbow/Hinge/rainbowMirrored" |
| 7 | # The validator doesn't know that this node exists because it is part of a | ||
| 8 | # sub-scene. | ||
| 9 | custom_nodes: "Components/Doors/Rainbow2/Hinge/rainbow" | ||
| diff --git a/proto/human.proto b/proto/human.proto index 41fce45..df33a5e 100644 --- a/proto/human.proto +++ b/proto/human.proto | |||
| @@ -221,9 +221,18 @@ message HumanRoom { | |||
| 221 | 221 | ||
| 222 | message HumanMap { | 222 | message HumanMap { |
| 223 | optional string display_name = 1; | 223 | optional string display_name = 1; |
| 224 | repeated string excluded_nodes = 2; | ||
| 225 | optional PortIdentifier worldport_entrance = 3; | ||
| 226 | optional MapType type = 4; | 224 | optional MapType type = 4; |
| 225 | |||
| 226 | optional PortIdentifier worldport_entrance = 3; | ||
| 227 | |||
| 228 | // These two fields are used by the validator and nothing else. excluded_nodes | ||
| 229 | // are objects in the tscn that are intentionally not mentioned in the txtpb. | ||
| 230 | // custom_nodes are the reverse of that; objects that are mentioned in the | ||
| 231 | // txtpb but not present in the tscn. These are generally created dynamically | ||
| 232 | // by the game mod, but may also be used for places where the validator is | ||
| 233 | // just wrong about the contents of the map file. | ||
| 234 | repeated string excluded_nodes = 2; | ||
| 235 | repeated string custom_nodes = 5; | ||
| 227 | } | 236 | } |
| 228 | 237 | ||
| 229 | message HumanProgressive { | 238 | message HumanProgressive { |
| diff --git a/tools/validator/human_processor.cpp b/tools/validator/human_processor.cpp index de80db0..5a1c095 100644 --- a/tools/validator/human_processor.cpp +++ b/tools/validator/human_processor.cpp | |||
| @@ -78,6 +78,10 @@ class HumanProcessor { | |||
| 78 | map_info.game_nodes[path].uses++; | 78 | map_info.game_nodes[path].uses++; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | for (const std::string& path : metadata.custom_nodes()) { | ||
| 82 | map_info.game_nodes[path].defined = true; | ||
| 83 | } | ||
| 84 | |||
| 81 | if (metadata.has_worldport_entrance()) { | 85 | if (metadata.has_worldport_entrance()) { |
| 82 | auto port_identifier = GetCompletePortIdentifier( | 86 | auto port_identifier = GetCompletePortIdentifier( |
| 83 | metadata.worldport_entrance(), current_map_name, std::nullopt); | 87 | metadata.worldport_entrance(), current_map_name, std::nullopt); |
