diff options
Diffstat (limited to 'src/game_data.cpp')
-rw-r--r-- | src/game_data.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/game_data.cpp b/src/game_data.cpp index 9d4dae0..fafc88c 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp | |||
@@ -125,6 +125,7 @@ struct GameData { | |||
125 | int panel_id = | 125 | int panel_id = |
126 | AddOrGetPanel(room_obj.name, panel_it.first.as<std::string>()); | 126 | AddOrGetPanel(room_obj.name, panel_it.first.as<std::string>()); |
127 | Panel &panel_obj = panels_[panel_id]; | 127 | Panel &panel_obj = panels_[panel_id]; |
128 | room_obj.panels.push_back(panel_id); | ||
128 | 129 | ||
129 | if (panel_it.second["colors"]) { | 130 | if (panel_it.second["colors"]) { |
130 | if (panel_it.second["colors"].IsScalar()) { | 131 | if (panel_it.second["colors"].IsScalar()) { |
@@ -174,6 +175,29 @@ struct GameData { | |||
174 | } | 175 | } |
175 | } | 176 | } |
176 | 177 | ||
178 | if (panel_it.second["required_panel"]) { | ||
179 | if (panel_it.second["required_panel"].IsMap()) { | ||
180 | std::string rp_room = room_obj.name; | ||
181 | if (panel_it.second["required_panel"]["room"]) { | ||
182 | rp_room = panel_it.second["required_panel"]["room"].as<std::string>(); | ||
183 | } | ||
184 | |||
185 | panel_obj.required_panels.push_back(AddOrGetPanel( | ||
186 | rp_room, panel_it.second["required_panel"]["panel"] | ||
187 | .as<std::string>())); | ||
188 | } else { | ||
189 | for (const auto &rp_node : panel_it.second["required_panel"]) { | ||
190 | std::string rp_room = room_obj.name; | ||
191 | if (rp_node["room"]) { | ||
192 | rp_room = rp_node["room"].as<std::string>(); | ||
193 | } | ||
194 | |||
195 | panel_obj.required_panels.push_back( | ||
196 | AddOrGetPanel(rp_room, rp_node["panel"].as<std::string>())); | ||
197 | } | ||
198 | } | ||
199 | } | ||
200 | |||
177 | if (panel_it.second["check"]) { | 201 | if (panel_it.second["check"]) { |
178 | panel_obj.check = panel_it.second["check"].as<bool>(); | 202 | panel_obj.check = panel_it.second["check"].as<bool>(); |
179 | } | 203 | } |
@@ -189,6 +213,10 @@ struct GameData { | |||
189 | panel_obj.exclude_reduce = | 213 | panel_obj.exclude_reduce = |
190 | panel_it.second["exclude_reduce"].as<bool>(); | 214 | panel_it.second["exclude_reduce"].as<bool>(); |
191 | } | 215 | } |
216 | |||
217 | if (panel_it.second["non_counting"]) { | ||
218 | panel_obj.non_counting = panel_it.second["non_counting"].as<bool>(); | ||
219 | } | ||
192 | } | 220 | } |
193 | } | 221 | } |
194 | 222 | ||