diff options
| author | Scott <scotth0828@gmail.com> | 2016-05-08 18:11:45 -0400 |
|---|---|---|
| committer | Scott <scotth0828@gmail.com> | 2016-05-08 18:11:45 -0400 |
| commit | b676208c9f1e97375564eacd23713a6f0f76f7be (patch) | |
| tree | d1e42f791a01672ff6a9b4378a6fa7bccf910321 /gamemode/client/cl_inventory.lua | |
| parent | 04c9a969be9694e8f8a35f17a97e9f8644990131 (diff) | |
| download | gmstranded-b676208c9f1e97375564eacd23713a6f0f76f7be.tar.gz gmstranded-b676208c9f1e97375564eacd23713a6f0f76f7be.tar.bz2 gmstranded-b676208c9f1e97375564eacd23713a6f0f76f7be.zip | |
Added images to combimenus, fixed image typos, added saltpetre
Diffstat (limited to 'gamemode/client/cl_inventory.lua')
| -rw-r--r-- | gamemode/client/cl_inventory.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua index 1e69ec7..5c394e6 100644 --- a/gamemode/client/cl_inventory.lua +++ b/gamemode/client/cl_inventory.lua @@ -409,8 +409,17 @@ function PANEL:Init() // for some reason has stone twice? v for j,k in SortedPairs(v.Results) do if (j != "Stone") then - icon = GMS.GetResourceByName(j).Icon - if (icon != nil && icon != "test.png") then img:SetImage(icon) else img:SetImage("vgui/avatar_default") end + if(GMS.Resources[j] == nil) then --This resource is not registered! + img:SetImage("vgui/avatar_default") + print("Resource:" .. j .. " not registed! This might be a bug!") + continue + elseif(GMS.Resources[j].Icon == nil) then + img:SetImage("vgui/avatar_default") + print("Resource:" .. j .. " does not have an .Icon field! This might be a bug!") + continue + else + img:SetImage(GMS.Resources[j].Icon) + end end end |
