MCPcopy Create free account
hub / github.com/DFHack/dfhack / world_specific_hooks

Function world_specific_hooks

plugins/eventful.cpp:473–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471 INTERPOSE_HOOK(proj_item_hook,checkMovement).apply(enable);
472}
473static void world_specific_hooks(color_ostream &out,bool enable)
474{
475 if(enable && find_reactions(out))
476 {
477 INTERPOSE_HOOK(product_hook, produce).apply(true);
478 }
479 else
480 {
481 INTERPOSE_HOOK(product_hook, produce).apply(false);
482 reactions.clear();
483 products.clear();
484 }
485}
486void disable_all_hooks(color_ostream &out)
487{
488 world_specific_hooks(out,false);

Callers 2

disable_all_hooksFunction · 0.85

Calls 3

find_reactionsFunction · 0.70
applyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected