| 449 | DFHACK_LUA_END |
| 450 | }; |
| 451 | static 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 | } |
| 467 | DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event) |
| 468 | { |
| 469 | switch (event) { |
no test coverage detected