From fc5001716ecc1c394787804553f1900c28c3837a Mon Sep 17 00:00:00 2001 From: Redox Date: Tue, 2 Apr 2024 20:24:20 +0200 Subject: [PATCH] Fix linting issues --- lua/entities/gmod_wire_expression2/core/custom/prop.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/custom/prop.lua b/lua/entities/gmod_wire_expression2/core/custom/prop.lua index ac805b6ca7..00cf26440e 100644 --- a/lua/entities/gmod_wire_expression2/core/custom/prop.lua +++ b/lua/entities/gmod_wire_expression2/core/custom/prop.lua @@ -298,7 +298,7 @@ __e2setcost(30) local function removeAllIn( self, tbl ) local count = 0 for k,v in pairs( tbl ) do - if (IsValid(v) and isOwner(self,v) and !v:IsPlayer()) then + if (IsValid(v) and isOwner(self,v) and not v:IsPlayer()) then count = count + 1 v:Remove() end @@ -425,9 +425,10 @@ e2function number entity:propGetElasticity() return this:GetElasticity() end +local persistCvar = GetConVar("sbox_persist") e2function void entity:propMakePersistent(number persistent) if not ValidAction(self, this, "persist") then return end - if GetConVarString("sbox_persist") == "0" then return end + if not persistCvar:GetBool() then return end if not gamemode.Call("CanProperty", self.player, "persist", this) then return end this:SetPersistent(persistent ~= 0) end