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

Merge pull request #431 from metrostroi-repo/#428

#428
This commit is contained in:
HellReach
2022-01-13 17:27:36 +03:00
committed by GitHub

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 not file.Exists("materials/"..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