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

Function command_result plugin_enable

plugins/manipulator.cpp:2312–2327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2310IMPLEMENT_VMETHOD_INTERPOSE(unitlist_hook, render);
2311
2312DFhackCExport command_result plugin_enable(color_ostream &out, bool enable)
2313{
2314 if (!gps)
2315 return CR_FAILURE;
2316
2317 if (enable != is_enabled)
2318 {
2319 if (!INTERPOSE_HOOK(unitlist_hook, feed).apply(enable) ||
2320 !INTERPOSE_HOOK(unitlist_hook, render).apply(enable))
2321 return CR_FAILURE;
2322
2323 is_enabled = enable;
2324 }
2325
2326 return CR_OK;
2327}
2328
2329DFhackCExport command_result plugin_init ( color_ostream &out, vector <PluginCommand> &commands)
2330{

Callers

nothing calls this directly

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected