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

Method save_and_scrub_settings

plugins/spectate.cpp:147–161  ·  view source on GitHub ↗

remove pausing, popups, and recentering from all announcements saves first so the original settings can be restored

Source from the content-addressed store, hash-verified

145 // remove pausing, popups, and recentering from all announcements
146 // saves first so the original settings can be restored
147 void save_and_scrub_settings(color_ostream &out) {
148 if (Gui::matchFocusString("dwarfmode/Settings")) {
149 DEBUG(control,out).print("not modifying announcement settings; vanilla settings screen is active\n");
150 return;
151 }
152
153 save_settings(out);
154
155 DEBUG(control,out).print("scrubbing announcement settings\n");
156 for (auto& flag : d_init->announcements.flags) {
157 flag.bits.DO_MEGA = false;
158 flag.bits.PAUSE = false;
159 flag.bits.RECENTER = false;
160 }
161 }
162} announcement_settings;
163
164/////////////////////////////////////////////////////

Callers 1

spectate_setSettingFunction · 0.80

Calls 1

printMethod · 0.45

Tested by

no test coverage detected