local STRUCT = {} STRUCT.Name = "Mithril Factory" STRUCT.Model = "models/props_wasteland/laundry_washer001a.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"] = "Copper", ["Description"] = "Smelt some copper ore into copper!", ["Requirements"] = {["Copper Ore"] = 1}, ["Results"] = {["Copper"] = 1}, ["Ratio"] = {1,1}, ["Image"] = "items/ingot_copper.png", ["CanCraft"] = checkfunc, ["Time"] = timefunc, ["Mults"] = {}, ["Skill"] = "Smelting", ["SmeltAll"] = true, ["MaxAmount"] = 100, } genericGiveRecipie(STRUCT,genericRecipe) local genericRecipe = { ["Name"] = "Iron", ["Description"] = "Smelt some iron ore into iron!", ["Requirements"] = {["Iron Ore"] = 1}, ["Results"] = {["Iron"] = 1}, ["Ratio"] = {1,1}, ["Image"] = "items/ingot_iron.png", ["CanCraft"] = checkfunc, ["Time"] = timefunc, ["Mults"] = {}, ["Skill"] = "Smelting", ["SmeltAll"] = true, ["MaxAmount"] = 100, } genericGiveRecipie(STRUCT,genericRecipe) local genericRecipe = { ["Name"] = "Tech", ["Description"] = "Smelt some tech ore into tech!", ["Requirements"] = {["Tech Ore"] = 1}, ["Results"] = {["Tech"] = 1}, ["Ratio"] = {1,1}, ["Image"] = "items/ingot_tech.png", ["CanCraft"] = checkfunc, ["Time"] = timefunc, ["Mults"] = {}, ["Skill"] = "Smelting", ["SmeltAll"] = true, ["MaxAmount"] = 100, } genericGiveRecipie(STRUCT,genericRecipe) 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"] = {}, ["Skill"] = "Smelting", ["SmeltAll"] = true, ["MaxAmount"] = 100, } genericGiveRecipie(STRUCT,genericRecipe) local genericRecipe = { ["Name"] = "Gold", ["Description"] = "Smelt some gold ore into gold!", ["Requirements"] = {["Gold Ore"] = 1}, ["Results"] = {["Gold"] = 1}, ["Ratio"] = {1,1}, ["Image"] = "items/ingot_gold.png", ["CanCraft"] = checkfunc, ["Time"] = timefunc, ["Mults"] = {}, ["Skill"] = "Smelting", ["SmeltAll"] = true, ["MaxAmount"] = 100, } genericGiveRecipie(STRUCT,genericRecipe) local genericRecipe = { ["Name"] = "Steel", ["Description"] = "Smelt some steel ore into steel!", ["Requirements"] = {["Steel Ore"] = 1}, ["Results"] = {["Steel"] = 1}, ["Ratio"] = {1,1}, ["Image"] = "items/ingot_steel.png", ["CanCraft"] = checkfunc, ["Time"] = timefunc, ["Mults"] = {}, ["Skill"] = "Smelting", ["SmeltAll"] = true, ["MaxAmount"] = 100, } genericGiveRecipie(STRUCT,genericRecipe) 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"] = {}, ["Skill"] = "Smelting", ["SmeltAll"] = true, ["MaxAmount"] = 100, } genericGiveRecipie(STRUCT,genericRecipe) local genericRecipe = { ["Name"] = "Pure Mithril", ["Description"] = "Smelt some mithril ore into pure mithril!", ["Requirements"] = {["Mithril Ore"] = 2}, ["Results"] = {["Pure Mithril"] = 1}, ["Ratio"] = {1,1}, ["Image"] = "items/ingot_puremithril.png", ["CanCraft"] = checkfunc, ["Time"] = timefunc, ["Mults"] = {}, ["Skill"] = "Smelting", ["SmeltAll"] = true, ["MaxAmount"] = 100, } genericGiveRecipie(STRUCT,genericRecipe) genericMakeCrafting(STRUCT) registerStructure(STRUCT)