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

Function enable_hooks

plugins/power-meter.cpp:165–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163DFHACK_PLUGIN_IS_ENABLED(enabled);
164
165static void enable_hooks(bool enable)
166{
167 enabled = enable;
168
169 INTERPOSE_HOOK(trap_hook, getName).apply(enable);
170 INTERPOSE_HOOK(trap_hook, updateAction).apply(enable);
171 INTERPOSE_HOOK(trap_hook, drawBuilding).apply(enable);
172}
173
174static bool makePowerMeter(df::pressure_plate_info *info, int min_power, int max_power, bool invert)
175{

Callers 3

makePowerMeterFunction · 0.70

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected