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

Function SaveSettings

plugins/channel-safely/channel-safely-plugin.cpp:171–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169 }
170
171 void SaveSettings() {
172 if (pfeature.isValid() && psetting.isValid()) {
173 try {
174 pfeature.ival(MONITOR) = config.monitoring;
175 pfeature.ival(VISION) = config.require_vision;
176 pfeature.ival(INSTADIG) = false; //config.insta_dig;
177 pfeature.ival(RESURRECT) = config.resurrect;
178 pfeature.ival(RISKAVERSE) = config.riskaverse;
179
180 psetting.ival(REFRESH_RATE) = config.refresh_freq;
181 psetting.ival(MONITOR_RATE) = config.monitor_freq;
182 psetting.ival(IGNORE_THRESH) = config.ignore_threshold;
183 psetting.ival(FALL_THRESH) = config.fall_threshold;
184 } catch (std::exception &e) {
185 ERR(plugin).print("{}\n", e.what());
186 }
187 }
188 }
189
190 void LoadSettings() {
191 pfeature = World::GetPersistentSiteData(FCONFIG_KEY);

Callers 2

LoadSettingsFunction · 0.85
channel_safelyFunction · 0.85

Calls 4

ivalMethod · 0.80
isValidMethod · 0.45
printMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected