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

Function command_result plugin_enable

plugins/stockflow.cpp:361–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361DFhackCExport command_result plugin_enable(color_ostream& out, bool enable) {
362 /* Accept the "enable stockflow"/"disable stockflow" syntax, where available. */
363 /* Same as "stockflow enable"/"stockflow disable" except without the status line. */
364 if (enable != enabled) {
365 if (!apply_hooks(out, enable)) {
366 return CR_FAILURE;
367 }
368
369 enabled = enable;
370 }
371
372 return CR_OK;
373}
374
375DFhackCExport command_result plugin_init(color_ostream &out, std::vector <PluginCommand> &commands) {
376 helper.init();

Callers

nothing calls this directly

Calls 1

apply_hooksFunction · 0.85

Tested by

no test coverage detected