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

Method UpdateConfig

plugins/autobutcher.cpp:282–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280 }
281
282 void UpdateConfig(color_ostream &out) {
283 if(!rconfig.isValid()) {
284 string keyname = WATCHLIST_CONFIG_KEY_PREFIX + Units::getRaceNameById(raceId);
285 rconfig = World::GetPersistentSiteData(keyname, true);
286 }
287 if(rconfig.isValid()) {
288 rconfig.ival(0) = raceId;
289 rconfig.ival(1) = isWatched;
290 rconfig.ival(2) = fk;
291 rconfig.ival(3) = mk;
292 rconfig.ival(4) = fa;
293 rconfig.ival(5) = ma;
294 }
295 else {
296 ERR(control,out).print("could not create persistent key for race: {}",
297 Units::getRaceNameById(raceId));
298 }
299 }
300
301 void RemoveConfig(color_ostream &out) {
302 if(!rconfig.isValid())

Callers 5

autobutcher_targetFunction · 0.80
autobutcher_cycleFunction · 0.80

Calls 3

ivalMethod · 0.80
isValidMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected