From 9fa8ffbecc2a403d7e6d69e7b65400fb310b51ed Mon Sep 17 00:00:00 2001 From: StrawWagen <64710817+StrawWagen@users.noreply.github.com> Date: Thu, 29 Jan 2026 20:27:12 -0700 Subject: [PATCH 1/2] Pass third "isPlay" argument in Expression2_CanEffect --- lua/entities/gmod_wire_expression2/core/custom/effects.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/custom/effects.lua b/lua/entities/gmod_wire_expression2/core/custom/effects.lua index 8654722253..260b2a647e 100644 --- a/lua/entities/gmod_wire_expression2/core/custom/effects.lua +++ b/lua/entities/gmod_wire_expression2/core/custom/effects.lua @@ -3,7 +3,7 @@ E2Lib.RegisterExtension("effects", false, "Allows E2s to play arbitrary effects. local wire_expression2_effect_burst_max = CreateConVar("wire_expression2_effect_burst_max", 4, FCVAR_ARCHIVE) local wire_expression2_effect_burst_rate = CreateConVar("wire_expression2_effect_burst_rate", 0.1, FCVAR_ARCHIVE) --- Use hook Expression2_CanEffect to blacklist/whitelist effects +-- Use hook Expression2_CanEffect(name, e2, isPlay) to blacklist/whitelist effects local effect_blacklist = { dof_node = true } @@ -169,7 +169,7 @@ e2function void effect:play(string name) name = name:lower() if effect_blacklist[name] then return self:throw("This effect is blacklisted!", nil) end - if hook.Run("Expression2_CanEffect", name, self) == false then return self:throw("A hook prevented this function from running", nil) end + if hook.Run("Expression2_CanEffect", name, self, true) == false then return self:throw("A hook prevented this function from running", nil) end fire(self, this, name) end @@ -181,7 +181,7 @@ end e2function number effectCanPlay(string name) if not isAllowed(self) then return 0 end if effect_blacklist[name] then return 0 end - if hook.Run("Expression2_CanEffect", name:lower(), self) == false then return 0 end + if hook.Run("Expression2_CanEffect", name:lower(), self, false) == false then return 0 end return 1 end From b9e6fdb9ac7e16f3dac09065efbe0a8bc3f74d27 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sat, 31 Jan 2026 19:01:43 +0300 Subject: [PATCH 2/2] Lowercase is_play --- lua/entities/gmod_wire_expression2/core/custom/effects.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_expression2/core/custom/effects.lua b/lua/entities/gmod_wire_expression2/core/custom/effects.lua index 260b2a647e..ab3f497014 100644 --- a/lua/entities/gmod_wire_expression2/core/custom/effects.lua +++ b/lua/entities/gmod_wire_expression2/core/custom/effects.lua @@ -3,7 +3,7 @@ E2Lib.RegisterExtension("effects", false, "Allows E2s to play arbitrary effects. local wire_expression2_effect_burst_max = CreateConVar("wire_expression2_effect_burst_max", 4, FCVAR_ARCHIVE) local wire_expression2_effect_burst_rate = CreateConVar("wire_expression2_effect_burst_rate", 0.1, FCVAR_ARCHIVE) --- Use hook Expression2_CanEffect(name, e2, isPlay) to blacklist/whitelist effects +-- Use hook Expression2_CanEffect(name, e2, is_play) to blacklist/whitelist effects local effect_blacklist = { dof_node = true }