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 26aee56..0846bb8 100644 --- a/tools/validator/human_processor.cpp +++ b/tools/validator/human_processor.cpp | |||
@@ -114,9 +114,14 @@ class HumanProcessor { | |||
114 | panel_info.definitions.push_back(h_panel); | 114 | panel_info.definitions.push_back(h_panel); |
115 | panel_info.proxies[h_panel.answer()].definitions.push_back(Proxy()); | 115 | panel_info.proxies[h_panel.answer()].definitions.push_back(Proxy()); |
116 | 116 | ||
117 | MapInfo& map_info = info_.maps[current_map_name]; | ||
118 | map_info.game_nodes[h_panel.path()].uses++; | ||
119 | |||
117 | for (const Proxy& h_proxy : h_panel.proxies()) { | 120 | for (const Proxy& h_proxy : h_panel.proxies()) { |
118 | ProxyInfo& proxy_info = panel_info.proxies[h_proxy.answer()]; | 121 | ProxyInfo& proxy_info = panel_info.proxies[h_proxy.answer()]; |
119 | proxy_info.definitions.push_back(h_proxy); | 122 | proxy_info.definitions.push_back(h_proxy); |
123 | |||
124 | map_info.game_nodes[h_proxy.path()].uses++; | ||
120 | } | 125 | } |
121 | 126 | ||
122 | if (h_panel.has_required_door()) { | 127 | if (h_panel.has_required_door()) { |
@@ -145,6 +150,9 @@ class HumanProcessor { | |||
145 | PaintingInfo& painting_info = info_.paintings[painting_identifier]; | 150 | PaintingInfo& painting_info = info_.paintings[painting_identifier]; |
146 | painting_info.definitions.push_back(h_painting); | 151 | painting_info.definitions.push_back(h_painting); |
147 | 152 | ||
153 | MapInfo& map_info = info_.maps[current_map_name]; | ||
154 | map_info.game_nodes[h_painting.path()].uses++; | ||
155 | |||
148 | if (h_painting.has_required_door()) { | 156 | if (h_painting.has_required_door()) { |
149 | DoorIdentifier required_door_identifier = *GetCompleteDoorIdentifier( | 157 | DoorIdentifier required_door_identifier = *GetCompleteDoorIdentifier( |
150 | h_painting.required_door(), current_map_name); | 158 | h_painting.required_door(), current_map_name); |
@@ -163,6 +171,9 @@ class HumanProcessor { | |||
163 | PortInfo& port_info = info_.ports[port_identifier]; | 171 | PortInfo& port_info = info_.ports[port_identifier]; |
164 | port_info.definitions.push_back(h_port); | 172 | port_info.definitions.push_back(h_port); |
165 | 173 | ||
174 | MapInfo& map_info = info_.maps[current_map_name]; | ||
175 | map_info.game_nodes[h_port.path()].uses++; | ||
176 | |||
166 | if (h_port.has_required_door()) { | 177 | if (h_port.has_required_door()) { |
167 | DoorIdentifier required_door_identifier = | 178 | DoorIdentifier required_door_identifier = |
168 | *GetCompleteDoorIdentifier(h_port.required_door(), current_map_name); | 179 | *GetCompleteDoorIdentifier(h_port.required_door(), current_map_name); |
@@ -182,12 +193,16 @@ class HumanProcessor { | |||
182 | room_identifier.set_map(current_map_name); | 193 | room_identifier.set_map(current_map_name); |
183 | room_identifier.set_name(current_room_name); | 194 | room_identifier.set_name(current_room_name); |
184 | letter_info.defined_in.push_back(room_identifier); | 195 | letter_info.defined_in.push_back(room_identifier); |
196 | |||
197 | MapInfo& map_info = info_.maps[current_map_name]; | ||
198 | map_info.game_nodes[h_letter.path()].uses++; | ||
185 | } | 199 | } |
186 | 200 | ||
187 | void ProcessMastery(const HumanMastery& h_mastery, | 201 | void ProcessMastery(const HumanMastery& h_mastery, |
188 | const std::string& current_map_name, | 202 | const std::string& current_map_name, |
189 | const std::string& current_room_name) { | 203 | const std::string& current_room_name) { |
190 | // Nothing really to validate about masteries yet. | 204 | MapInfo& map_info = info_.maps[current_map_name]; |
205 | map_info.game_nodes[h_mastery.path()].uses++; | ||
191 | } | 206 | } |
192 | 207 | ||
193 | void ProcessKeyholder(const HumanKeyholder& h_keyholder, | 208 | void ProcessKeyholder(const HumanKeyholder& h_keyholder, |
@@ -200,6 +215,9 @@ class HumanProcessor { | |||
200 | 215 | ||
201 | KeyholderInfo& keyholder_info = info_.keyholders[keyholder_identifier]; | 216 | KeyholderInfo& keyholder_info = info_.keyholders[keyholder_identifier]; |
202 | keyholder_info.definitions.push_back(h_keyholder); | 217 | keyholder_info.definitions.push_back(h_keyholder); |
218 | |||
219 | MapInfo& map_info = info_.maps[current_map_name]; | ||
220 | map_info.game_nodes[h_keyholder.path()].uses++; | ||
203 | } | 221 | } |
204 | 222 | ||
205 | void ProcessDoorsFile(std::filesystem::path path, | 223 | void ProcessDoorsFile(std::filesystem::path path, |