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

Function enable_hooks

plugins/building-hacks.cpp:451–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449 DFHACK_LUA_END
450};
451static void enable_hooks(bool enable)
452{
453 INTERPOSE_HOOK(work_hook,getImpassableOccupancy).apply(enable);
454 //machine part
455 INTERPOSE_HOOK(work_hook,getPowerInfo).apply(enable);
456 INTERPOSE_HOOK(work_hook,getMachineInfo).apply(enable);
457 INTERPOSE_HOOK(work_hook,isPowerSource).apply(enable);
458 INTERPOSE_HOOK(work_hook,categorize).apply(enable);
459 INTERPOSE_HOOK(work_hook,uncategorize).apply(enable);
460 INTERPOSE_HOOK(work_hook,canConnectToMachine).apply(enable);
461 INTERPOSE_HOOK(work_hook,isUnpowered).apply(enable);
462 INTERPOSE_HOOK(work_hook,canBeRoomSubset).apply(enable);
463 //update n render
464 INTERPOSE_HOOK(work_hook,updateAction).apply(enable);
465 INTERPOSE_HOOK(work_hook,drawBuilding).apply(enable);
466}
467DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event)
468{
469 switch (event) {

Callers 2

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected