| 1948 | DFHACK_PLUGIN_IS_ENABLED(is_enabled); |
| 1949 | |
| 1950 | static 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 | |
| 1967 | static bool enable_plugin() |
| 1968 | { |
no test coverage detected