summaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/gunchunks.lua
blob: 9e1c1571a5b32cbeb9c0086d7d7bf71f13e20a2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--The resources produced from a gunchunks workbench, somewhat cleverly condensed here.
local materials = {
  "Copper",
  "Iron",
  "Tech",
  "Silver",
  "Gold",
  "Steel",
  "Platinum",
}

local gunparts = {
  {"Gunslide","test.png"},
  {"Gunbarrel","test.png"},
  {"Gungrip", "test.png"},
  {"Gunmagazine", "test.png"},
  {"Weapon Scope", "test.png"},
  {"Reflex Scope", "test.png"},
}

for k,v in pairs(materials) do
  for i,j in pairs(gunparts) do
    local ITEM = {}
    ITEM.Name = v .. " " .. j[1]
    ITEM.Description = "A part of a weapon!"
    ITEM.Icon = j[2]
    ITEM.UniqueData = false
    genericMakeDroppable(ITEM)
    GMS.RegisterResource(ITEM)
  end
end