summaryrefslogtreecommitdiff
path: root/gamemode/structuresystem/structures/steelfurnace.lua
blob: 9c40161d61bc1d821862e5823c096f82c83c1895 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
local STRUCT = {}

STRUCT.Name = "Steel Furnace"
STRUCT.Model = "models/props_industrial/winch_deck.mdl"

STRUCT.onInitialize = function(self)
  --print("Initalize called!")
end

STRUCT.uniquedata = false

STRUCT.onUse = function(self, ply)
  if CLIENT and ply != LocalPlayer() then return end
  --print("onUse called!")
end

STRUCT.timemult = 0.5
STRUCT.skillease = 0.25

local timefunc = function(ply, num)
  local time = math.pow(num,STRUCT.timemult)*4 - math.pow(ply:GetSkill("Smelting"),STRUCT.skillease)
  return time
end
local checkfunc = function(ply)
  return true
end

local genericRecipe = {
  ["Name"] = "Platinum",
  ["Description"] = "Smelt some platinum ore into platinum!",
  ["Requirements"] = {["Platinum Ore"] = 1},
  ["Results"] = {["Platinum"] = 1},
  ["Ratio"] = {1,1},
  ["Image"] = "items/ingot_platinum.png",
  ["CanCraft"] = checkfunc,
  ["Time"] = timefunc,
  ["Mults"] = {1,5,10,25},
  ["Skill"] = "Smelting",
  ["SmeltAll"] = true,
  ["MaxAmount"] = 50,
}

genericGiveRecipie(STRUCT,genericRecipe)


genericMakeCrafting(STRUCT)

registerStructure(STRUCT)