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

Function enable_hooks

plugins/siege-engine.cpp:1950–1965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1948DFHACK_PLUGIN_IS_ENABLED(is_enabled);
1949
1950static void enable_hooks(bool enable)
1951{
1952 is_enabled = enable;
1953
1954 INTERPOSE_HOOK(projectile_hook, checkMovement).apply(enable);
1955 INTERPOSE_HOOK(projectile_hook, checkImpact).apply(enable);
1956
1957 INTERPOSE_HOOK(building_hook, getWorkshopProfile).apply(enable);
1958 INTERPOSE_HOOK(building_hook, getStockpileLinks).apply(enable);
1959 INTERPOSE_HOOK(building_hook, updateAction).apply(enable);
1960
1961 if (enable)
1962 load_engines();
1963 else
1964 clear_engines();
1965}
1966
1967static bool enable_plugin()
1968{

Callers 4

enable_pluginFunction · 0.70

Calls 3

load_enginesFunction · 0.85
clear_enginesFunction · 0.85
applyMethod · 0.45

Tested by

no test coverage detected