MCPcopy Create free account
hub / github.com/DFHack/dfhack / command_result plugin_load_site_data

Function command_result plugin_load_site_data

plugins/work-now.cpp:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74DFhackCExport 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
90static void poke_idlers() {
91 Job::checkBuildingsNow();

Callers

nothing calls this directly

Calls 2

isValidMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected