summaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-06 17:49:37 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-06 17:49:37 -0400
commit6074bf4450a35ff60fb68d104db8aba58d8c4de9 (patch)
tree1ffc32aaac5624aa126202395213e439c6213bbc /gamemode/itemsystem/items
parent444d155bcc28d1a4be11ef116905458bff3f0255 (diff)
downloadgmstranded-6074bf4450a35ff60fb68d104db8aba58d8c4de9.tar.gz
gmstranded-6074bf4450a35ff60fb68d104db8aba58d8c4de9.tar.bz2
gmstranded-6074bf4450a35ff60fb68d104db8aba58d8c4de9.zip
Added all gun chunk icons
Diffstat (limited to 'gamemode/itemsystem/items')
-rw-r--r--gamemode/itemsystem/items/gunchunks.lua19
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)