| 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()) |
no test coverage detected