diff options
Diffstat (limited to 'gamemode/itemsystem')
| -rw-r--r-- | gamemode/itemsystem/items/gunchunks.lua | 19 |
1 files changed, 11 insertions, 8 deletions
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) |
