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

Function command_result plugin_enable

plugins/autofarm.cpp:454–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454DFhackCExport command_result plugin_enable(color_ostream& out, bool enable)
455{
456 if (!Core::getInstance().isMapLoaded() || !World::isFortressMode()) {
457 out.printerr("Cannot enable {} without a loaded fort.\n", plugin_name);
458 return CR_FAILURE;
459 }
460
461 enabled = enable;
462 autofarmInstance->save_state(out);
463 return CR_OK;
464}
465
466DFhackCExport command_result plugin_load_site_data (color_ostream &out) {
467 cycle_timestamp = 0;

Callers

nothing calls this directly

Calls 1

save_stateMethod · 0.80

Tested by

no test coverage detected