From b56bf1b60a309fbf3a3d752fd093683444008710 Mon Sep 17 00:00:00 2001 From: Ilya Krasnow Date: Thu, 13 Jan 2022 16:53:37 +0300 Subject: [PATCH] Fix govnocode --- lua/autorun/metrostroi.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/autorun/metrostroi.lua b/lua/autorun/metrostroi.lua index 5ac2cc9..62a489c 100644 --- a/lua/autorun/metrostroi.lua +++ b/lua/autorun/metrostroi.lua @@ -133,14 +133,14 @@ function Metrostroi.AddSkin(category,name,tbl) tbl = Table end if CLIENT and tbl.textures then - local find + local nofind for k,v in pairs(tbl.textures) do - if v:len()>2 and not file.Exists("materials/"..v..".vmt","GAME") and not file.Exists("materials/models/"..v..".vmt","GAME") then - find = true + if not file.Exists("materials/"..v..".vmt","GAME") and not file.Exists("materials/models/"..v..".vmt","GAME") then + nofind = true ErrorNoHalt(Format("Metrostroi: %s texture: %s, not found. Check folder and addons!\n",category,v)) end end - if find then return end + if nofind then return end end if not Metrostroi.Skins[category] then print(Format("Metrostroi: Added a %s skin category",category)) @@ -1034,4 +1034,4 @@ if SERVER then end end, "metrostroiMonitoring") hook.Add("ShutDown","MetrostroiMonitoring",shutdown) -end \ No newline at end of file +end