From e879c365577b0cc51c48bace7cd5fb52cdc26eaa Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 20 Jun 2016 15:33:39 -0400 Subject: Re-syncing last updated copy --- .../structuresystem/structures/techfurnace.lua | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 gamemode/structuresystem/structures/techfurnace.lua (limited to 'gamemode/structuresystem/structures/techfurnace.lua') diff --git a/gamemode/structuresystem/structures/techfurnace.lua b/gamemode/structuresystem/structures/techfurnace.lua new file mode 100644 index 0000000..fb93855 --- /dev/null +++ b/gamemode/structuresystem/structures/techfurnace.lua @@ -0,0 +1,48 @@ +local STRUCT = {} + +STRUCT.Name = "Tech Furnace" +STRUCT.Model = "models/props/cs_militia/dryer.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"] = "Silver", + ["Description"] = "Smelt some silver ore into silver!", + ["Requirements"] = {["Silver Ore"] = 1}, + ["Results"] = {["Silver"] = 1}, + ["Ratio"] = {1,1}, + ["Image"] = "items/ingot_silver.png", + ["CanCraft"] = checkfunc, + ["Time"] = timefunc, + ["Mults"] = {1,5,10,25}, + ["Skill"] = "Smelting", + ["SmeltAll"] = true, + ["MaxAmount"] = 50, +} + +genericGiveRecipie(STRUCT,genericRecipe) + + +genericMakeCrafting(STRUCT) + +registerStructure(STRUCT) -- cgit v1.2.3-70-g09d2