diff options
Diffstat (limited to 'gamemode/structuresystem/structures/stonefurnace.lua')
| -rw-r--r-- | gamemode/structuresystem/structures/stonefurnace.lua | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/gamemode/structuresystem/structures/stonefurnace.lua b/gamemode/structuresystem/structures/stonefurnace.lua index 84c0311..c5b4c4d 100644 --- a/gamemode/structuresystem/structures/stonefurnace.lua +++ b/gamemode/structuresystem/structures/stonefurnace.lua @@ -3,29 +3,44 @@ local STRUCT = {} STRUCT.Name = "Stone Furnace" STRUCT.Model = "models/props/de_inferno/ClayOven.mdl" -STRUCT.Structure = { - {"models/props/de_inferno/ClayOven.mdl",Vector(0,0,0),Angle(0,0,0)} -} - STRUCT.onInitialize = function(self) - print("Initalize called!") + --print("Initalize called!") end STRUCT.uniquedata = false STRUCT.onUse = function(self, ply) - print("I am the old use function!") + if CLIENT and ply != LocalPlayer() then return end + --print("onUse called!") end -STRUCT.Recipes = {} - STRUCT.timemult = 0.5 STRUCT.skillease = 0.25 -genericMakeFurnace(STRUCT) -recipieForSmelt(STRUCT.Recipes,"Copper", "Smelt copper ore into copper", "Copper Ore", "Copper", {1,1}, {1,5,10}) +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"] = {1,5,10,25}, + ["Skill"] = "Smelting", + ["SmeltAll"] = true, + ["MaxAmount"] = 50, +} -print("stone furnace's recipies:") -PrintTable(STRUCT.Recipes) +genericGiveRecipie(STRUCT,genericRecipe) +genericMakeCrafting(STRUCT) registerStructure(STRUCT) |
