diff options
Diffstat (limited to 'tools/validator/human_processor.cpp')
-rw-r--r-- | tools/validator/human_processor.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tools/validator/human_processor.cpp b/tools/validator/human_processor.cpp index af40980..5a7e78a 100644 --- a/tools/validator/human_processor.cpp +++ b/tools/validator/human_processor.cpp | |||
@@ -62,7 +62,7 @@ class HumanProcessor { | |||
62 | } | 62 | } |
63 | 63 | ||
64 | void ProcessMetadataFile(std::filesystem::path path, | 64 | void ProcessMetadataFile(std::filesystem::path path, |
65 | const std::string& current_map_name) { | 65 | const std::string& current_map_name) { |
66 | if (!std::filesystem::exists(path)) { | 66 | if (!std::filesystem::exists(path)) { |
67 | return; | 67 | return; |
68 | } | 68 | } |
@@ -115,6 +115,10 @@ class HumanProcessor { | |||
115 | for (const HumanKeyholder& h_keyholder : h_room.keyholders()) { | 115 | for (const HumanKeyholder& h_keyholder : h_room.keyholders()) { |
116 | ProcessKeyholder(h_keyholder, current_map_name, h_room.name()); | 116 | ProcessKeyholder(h_keyholder, current_map_name, h_room.name()); |
117 | } | 117 | } |
118 | |||
119 | for (const HumanEnding& h_ending : h_room.endings()) { | ||
120 | ProcessEnding(h_ending, current_map_name, h_room.name()); | ||
121 | } | ||
118 | } | 122 | } |
119 | 123 | ||
120 | void ProcessPanel(const HumanPanel& h_panel, | 124 | void ProcessPanel(const HumanPanel& h_panel, |
@@ -235,6 +239,20 @@ class HumanProcessor { | |||
235 | map_info.game_nodes[h_keyholder.path()].uses++; | 239 | map_info.game_nodes[h_keyholder.path()].uses++; |
236 | } | 240 | } |
237 | 241 | ||
242 | void ProcessEnding(const HumanEnding& h_ending, | ||
243 | const std::string& current_map_name, | ||
244 | const std::string& current_room_name) { | ||
245 | EndingInfo& ending_info = info_.endings[h_ending.name()]; | ||
246 | |||
247 | RoomIdentifier room_identifier; | ||
248 | room_identifier.set_map(current_map_name); | ||
249 | room_identifier.set_name(current_room_name); | ||
250 | ending_info.defined_in.push_back(room_identifier); | ||
251 | |||
252 | MapInfo& map_info = info_.maps[current_map_name]; | ||
253 | map_info.game_nodes[h_ending.path()].uses++; | ||
254 | } | ||
255 | |||
238 | void ProcessDoorsFile(std::filesystem::path path, | 256 | void ProcessDoorsFile(std::filesystem::path path, |
239 | const std::string& current_map_name) { | 257 | const std::string& current_map_name) { |
240 | if (!std::filesystem::exists(path)) { | 258 | if (!std::filesystem::exists(path)) { |