1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Fix govnocode

This commit is contained in:
Ilya Krasnow
2022-01-13 16:53:37 +03:00
committed by GitHub
parent 22bc97d873
commit b56bf1b60a

View File

@@ -133,14 +133,14 @@ function Metrostroi.AddSkin(category,name,tbl)
tbl = Table tbl = Table
end end
if CLIENT and tbl.textures then if CLIENT and tbl.textures then
local find local nofind
for k,v in pairs(tbl.textures) do 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 if not file.Exists("materials/"..v..".vmt","GAME") and not file.Exists("materials/models/"..v..".vmt","GAME") then
find = true nofind = true
ErrorNoHalt(Format("Metrostroi: %s texture: %s, not found. Check folder and addons!\n",category,v)) ErrorNoHalt(Format("Metrostroi: %s texture: %s, not found. Check folder and addons!\n",category,v))
end end
end end
if find then return end if nofind then return end
end end
if not Metrostroi.Skins[category] then if not Metrostroi.Skins[category] then
print(Format("Metrostroi: Added a %s skin category",category)) print(Format("Metrostroi: Added a %s skin category",category))
@@ -1034,4 +1034,4 @@ if SERVER then
end end
end, "metrostroiMonitoring") end, "metrostroiMonitoring")
hook.Add("ShutDown","MetrostroiMonitoring",shutdown) hook.Add("ShutDown","MetrostroiMonitoring",shutdown)
end end