From 1e5a0b8d6eb25732be95e580b5f4a928164ed23c Mon Sep 17 00:00:00 2001 From: DefbeatCZ <54858078+DefbeatCZ@users.noreply.github.com> Date: Tue, 7 Jan 2020 23:21:33 +0100 Subject: [PATCH] Added Mending --- media/lua/server/HandlerXP.lua | 8 ++ media/scripts/LTSMending.txt | 183 ++++++++++++++++++++++++ media/textures/Item_SharpeningStone.png | Bin 0 -> 708 bytes 3 files changed, 191 insertions(+) create mode 100644 media/scripts/LTSMending.txt create mode 100644 media/textures/Item_SharpeningStone.png diff --git a/media/lua/server/HandlerXP.lua b/media/lua/server/HandlerXP.lua index 6e5b1c9..e4b3a07 100644 --- a/media/lua/server/HandlerXP.lua +++ b/media/lua/server/HandlerXP.lua @@ -37,3 +37,11 @@ end function CraftXP_Scrapping(recipe, ingredients, result, player) player:getXp():AddXP(Perks.MetalWelding, 2); end + +function CraftXP_Mending_Wood(recipe, ingredients, result, player) + player:getXp():AddXP(Perks.Woodwork, 10); +end + +function CraftXP_Mending_Blade(recipe, ingredients, result, player) + player:getXp():AddXP(Perks.MetalWelding, 10); +end diff --git a/media/scripts/LTSMending.txt b/media/scripts/LTSMending.txt new file mode 100644 index 0000000..a33f634 --- /dev/null +++ b/media/scripts/LTSMending.txt @@ -0,0 +1,183 @@ +module DLTS { + + imports { + Base + } + + /** ------------------------------------------------------------------------- **/ + /** Mending: Components **/ + + item LTSSharpeningStone { + Type=Normal, + Weight=0.2, + DisplayName=Sharpening Stone, + Icon=SharpeningStone, + } + + item LTSReplacementHandle { + Type=Normal, + Weight=0.8, + DisplayName=Replacement Tool Handle, + Icon=Pickaxe_Handle, + } + + recipe LTS Prepare Sharpening Stone { + keep Stone, + RippedSheets, + SharpedStone, + Water=2, + Result:LTSSharpeningStone, + Time:240.0, + Category:LTS-Base, + } + + recipe LTS Make Replacement Tool Handle { + keep HuntingKnife/KitchenKnife, + Plank/TreeBranch, + Result:LTSReplacementHandle, + Time:240.0, + Category:LTS-Base, + } + + /** ------------------------------------------------------------------------- **/ + /** Mending: Recipes With Handle Replace (e.g. Axe) **/ + + recipe LTS Renew Axe { + Axe, + LTSReplacementHandle, + Twine=2, + Result:Axe, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + } + + recipe LTS Renew Wood Axe { + WoodAxe, + LTSReplacementHandle, + Twine=2, + Result:WoodAxe, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + } + + recipe LTS Renew PickAxe { + PickAxe, + LTSReplacementHandle, + Twine=2, + Result:PickAxe, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + } + + recipe LTS Renew Hammer { + Hammer, + LTSReplacementHandle, + Twine=2, + Result:Hammer, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + } + + recipe LTS Renew Shovel { + Shovel, + LTSReplacementHandle, + Twine=2, + Result:Shovel, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + Sound:Hammering, + } + + recipe LTS Renew Shovel { + Shovel2, + LTSReplacementHandle, + Twine=2, + Result:Shovel2, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + Sound:Hammering, + } + + recipe LTS Renew Garden Hoe { + GardenHoe, + LTSReplacementHandle, + Twine=2, + Result:GardenHoe, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + Sound:Hammering, + } + + recipe LTS Renew Sledgehammer { + Sledgehammer, + LTSReplacementHandle, + Twine=2, + Result:Sledgehammer, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + Sound:Hammering, + } + + recipe LTS Renew Sledgehammer { + Sledgehammer2, + LTSReplacementHandle, + Twine=2, + Result:Sledgehammer2, + Time:480, + OnGiveXP:CraftXP_Mending_Wood, + Category:LTS-Base, + Sound:Hammering, + } + + /** ------------------------------------------------------------------------- **/ + /** Mending: Recipes With Blade Sharpening (e.g. Machete) **/ + + recipe LTS Renew Hunting Knife { + keep Stone, + HuntingKnife, + LTSSharpeningStone=2, + RippedSheets=2, + Water=2, + Result:HuntingKnife, + Time:480, + OnGiveXP:CraftXP_Mending_Blade, + Sound:SliceMeat, + Category:LTS-Base, + } + + recipe LTS Renew Machete { + keep Stone, + Machete, + LTSSharpeningStone=3, + RippedSheets=2, + Water=3, + Result:Machete, + Time:480, + OnGiveXP:CraftXP_Mending_Blade, + Sound:SliceMeat, + Category:LTS-Base, + } + + recipe LTS Renew Katana { + keep Stone, + Katana, + LTSSharpeningStone=4, + RippedSheets=2, + Water=4, + Result:Katana, + Time:480, + OnGiveXP:CraftXP_Mending_Blade, + Sound:SliceMeat, + Category:LTS-Base, + } + +} + \ No newline at end of file diff --git a/media/textures/Item_SharpeningStone.png b/media/textures/Item_SharpeningStone.png new file mode 100644 index 0000000000000000000000000000000000000000..dd2da346089091df246f5abce12e0fc4462dc282 GIT binary patch literal 708 zcmV;#0z3VQP)6)02y>e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00JyYL_t(o!|j*9PuoBg$G?uE zXS-4ALkKGj8A2t5)QPQA+1NVs=dyKWK$W^7VIh#)h?ppK@Ir^`S?|uzKTA<1xXE{p z{P}*r@7=`)Ui$Ufy0w&Yx(|obOHqQ}+A(E>r^cCYh7o3Pt6a@fa zo9Fm(ch^bG_+P-^M-hTBEaw1f%QPMeCn5k);eEt-L*YeHlnL-?6T`oKSgnxV-($00 zd!xQ^04ki1?JPm7(wkumyF+{L+j^lH7KIhU@#o}XLCvB&Ve*$lxVgTz z8%{~4soNRacT4OjGQ} zaVf%G-}ildI6A^@l32-@ogJ&&Ir=W}$~hp*!0uRt9PcI*d_FzJr;`&a_P%hd1ibL^ z_!tL=hgha*r4-x?^7{Mb