diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-06-20 15:33:39 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-06-20 15:33:39 -0400 |
| commit | e879c365577b0cc51c48bace7cd5fb52cdc26eaa (patch) | |
| tree | 822a52cf38efd6815f2b7483cf6369e68c3dab23 /gamemode/structuresystem/structures/stonefurnace.lua | |
| parent | f797cbe348dd52b51da4cd4812cfa291d1434095 (diff) | |
| download | gmstranded-e879c365577b0cc51c48bace7cd5fb52cdc26eaa.tar.gz gmstranded-e879c365577b0cc51c48bace7cd5fb52cdc26eaa.tar.bz2 gmstranded-e879c365577b0cc51c48bace7cd5fb52cdc26eaa.zip | |
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) |
