From 192871e2224255039bec3c8160a642c04c3c6cd6 Mon Sep 17 00:00:00 2001 From: bi Date: Wed, 6 Jun 2018 14:42:12 +0300 Subject: [PATCH] Toggling: toggling mod now enables/disables all hooks by default --- vmf/scripts/mods/vmf/modules/core/toggling.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vmf/scripts/mods/vmf/modules/core/toggling.lua b/vmf/scripts/mods/vmf/modules/core/toggling.lua index 53bc690..8b0ea41 100644 --- a/vmf/scripts/mods/vmf/modules/core/toggling.lua +++ b/vmf/scripts/mods/vmf/modules/core/toggling.lua @@ -11,8 +11,10 @@ vmf.set_mod_state = function (mod, is_enabled, initial_call) mod._data.is_enabled = is_enabled if is_enabled then + mod:enable_all_hooks() vmf.mod_enabled_event(mod, initial_call) else + mod:disable_all_hooks() vmf.mod_disabled_event(mod, initial_call) end