| 72 | } |
| 73 | |
| 74 | DFhackCExport command_result plugin_load_site_data (color_ostream &out) { |
| 75 | config = World::GetPersistentSiteData(CONFIG_KEY); |
| 76 | |
| 77 | if (!config.isValid()) { |
| 78 | DEBUG(log,out).print("no config found in this save; initializing\n"); |
| 79 | config = World::AddPersistentSiteData(CONFIG_KEY); |
| 80 | config.set_bool(CONFIG_IS_ENABLED, is_enabled); |
| 81 | } |
| 82 | |
| 83 | is_enabled = config.get_bool(CONFIG_IS_ENABLED); |
| 84 | DEBUG(log,out).print("loading persisted enabled state: {}\n", |
| 85 | is_enabled ? "true" : "false"); |
| 86 | |
| 87 | return CR_OK; |
| 88 | } |
| 89 | |
| 90 | static void poke_idlers() { |
| 91 | Job::checkBuildingsNow(); |