MCPcopy Create free account
hub / github.com/DFHack/dfhack / validate_materials_config

Function validate_materials_config

plugins/buildingplan/buildingplan.cpp:234–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234static void validate_materials_config(color_ostream &out, bool verbose = false) {
235 if (config.get_bool(CONFIG_BLOCKS)
236 || config.get_bool(CONFIG_BOULDERS)
237 || config.get_bool(CONFIG_LOGS)
238 || config.get_bool(CONFIG_BARS))
239 return;
240
241 if (verbose)
242 out.printerr("all contruction materials disabled; resetting config\n");
243
244 config.set_bool(CONFIG_BLOCKS, true);
245 config.set_bool(CONFIG_BOULDERS, true);
246 config.set_bool(CONFIG_LOGS, true);
247 config.set_bool(CONFIG_BARS, false);
248}
249
250static void reset_filters(color_ostream &out) {
251 cur_heat_safety.clear();

Callers 2

setSettingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected