From 6074bf4450a35ff60fb68d104db8aba58d8c4de9 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Fri, 6 May 2016 17:49:37 -0400 Subject: Added all gun chunk icons --- gamemode/itemsystem/items/gunchunks.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'gamemode/itemsystem/items') diff --git a/gamemode/itemsystem/items/gunchunks.lua b/gamemode/itemsystem/items/gunchunks.lua index 9e1c157..412ae68 100644 --- a/gamemode/itemsystem/items/gunchunks.lua +++ b/gamemode/itemsystem/items/gunchunks.lua @@ -10,20 +10,23 @@ local materials = { } local gunparts = { - {"Gunslide","test.png"}, - {"Gunbarrel","test.png"}, - {"Gungrip", "test.png"}, - {"Gunmagazine", "test.png"}, - {"Weapon Scope", "test.png"}, - {"Reflex Scope", "test.png"}, + "Gunslide", + "Gunbarrel", + "Gungrip", + "Gunmagazine", + "Weapon Scope", + "Reflex Scope", } for k,v in pairs(materials) do for i,j in pairs(gunparts) do local ITEM = {} - ITEM.Name = v .. " " .. j[1] + ITEM.Name = v .. " " .. j ITEM.Description = "A part of a weapon!" - ITEM.Icon = j[2] + local filename = string.Replace(v .. " " .. j," ","_") + local directory = "items/weaponparts/" .. filename .. ".png" + print("File for " .. ITEM.Name .. " is " .. directory) + ITEM.Icon = directory ITEM.UniqueData = false genericMakeDroppable(ITEM) GMS.RegisterResource(ITEM) -- cgit v1.2.3-70-g09d2