From 133cff1f092e016f898abf9bdfb3183ea69f7fa9 Mon Sep 17 00:00:00 2001 From: DefbeatCZ <54858078+DefbeatCZ@users.noreply.github.com> Date: Tue, 7 Jan 2020 22:26:27 +0100 Subject: [PATCH] Added Scrapping and Forging --- media/lua/server/HandlerXP.lua | 18 ++-- media/scripts/LTSMetalwork.txt | 178 +++++++++++++++++++++++++++++++ media/textures/Item_HackSaw2.png | Bin 0 -> 768 bytes 3 files changed, 185 insertions(+), 11 deletions(-) create mode 100644 media/scripts/LTSMetalwork.txt create mode 100644 media/textures/Item_HackSaw2.png diff --git a/media/lua/server/HandlerXP.lua b/media/lua/server/HandlerXP.lua index 3245fc9..6e5b1c9 100644 --- a/media/lua/server/HandlerXP.lua +++ b/media/lua/server/HandlerXP.lua @@ -27,17 +27,13 @@ function CraftXP_Ropework(recipe, ingredients, result, player) end function CraftXP_Burner(recipe, ingredients, result, player) - player:getXp():AddXP(Perks.MetalWelding, 25); + player:getXp():AddXP(Perks.MetalWelding, 45); end +function CraftXP_Smithing(recipe, ingredients, result, player) + player:getXp():AddXP(Perks.MetalWelding, 15); +end - - - - - - - - - - +function CraftXP_Scrapping(recipe, ingredients, result, player) + player:getXp():AddXP(Perks.MetalWelding, 2); +end diff --git a/media/scripts/LTSMetalwork.txt b/media/scripts/LTSMetalwork.txt new file mode 100644 index 0000000..b39a367 --- /dev/null +++ b/media/scripts/LTSMetalwork.txt @@ -0,0 +1,178 @@ +module DLTS { + + imports { + Base, camping, farming + } + + recipe LTS Forge Metal Sheet { + BlowTorch=7, + keep WeldingMask, + keep Hammer, + ScrapMetal=10, + Result:SheetMetal, + Time:480.0, + Category:LTS-Metal, + Sound:PZ_Fire, + OnGiveXP:CraftXP_Smithing, + } + + recipe LTS Forge Small Metal Sheet { + BlowTorch=7, + keep WeldingMask, + keep Hammer, + ScrapMetal=3, + Result:SmallSheetMetal, + Time:480.0, + Category:LTS-Metal, + Sound:PZ_Fire, + OnGiveXP:CraftXP_Smithing, + } + + recipe LTS Forge Metal Bar { + BlowTorch=7, + keep WeldingMask, + keep Hammer, + ScrapMetal=3, + Result:MetalBar, + Time:480.0, + Category:LTS-Metal, + Sound:PZ_Fire, + OnGiveXP:CraftXP_Smithing, + } + + recipe LTS Forge Metal Pipe { + BlowTorch=7, + keep WeldingMask, + keep Hammer, + ScrapMetal=3, + Result:MetalPipe, + Time:480.0, + Category:LTS-Metal, + Sound:PZ_Fire, + OnGiveXP:CraftXP_Smithing, + } + + recipe LTS Forge Nails { + BlowTorch=7, + keep WeldingMask, + keep Hammer, + ScrapMetal=4, + Result:NailsBox, + Time:480.0, + Category:LTS-Metal, + Sound:PZ_Fire, + OnGiveXP:CraftXP_Smithing, + } + + recipe LTS Forge Wire { + BlowTorch=7, + keep WeldingMask, + keep Hammer, + ScrapMetal=3, + Result:Wire, + Time:480.0, + Category:LTS-Metal, + Sound:PZ_Fire, + OnGiveXP:CraftXP_Smithing, + } + + recipe LTS Forge Barbed Wire { + BlowTorch=7, + keep WeldingMask, + keep Hammer, + Wire=5, + ScrapMetal=3, + Result:BarbedWire, + Time:480.0, + Category:LTS-Metal, + Sound:PZ_Fire, + OnGiveXP:CraftXP_Smithing, + } + + /** ------------------------------------------------------------------------- **/ + /** Smithing: Scrapping Saw (used in all scrap recipes) **/ + + item LTSScrappingSaw { + Type=Normal, + Weight=0.8, + DisplayName=Metal Scrapping Saw, + Icon=HackSaw2, + StaticModel=Hacksaw, + } + + recipe LTS Make Scrapping Saw { + BlowTorch=5, + keep WeldingMask, + Saw, + ScrapMetal=3, + LTSSharpeningStone=3, + Water=3, + Result:LTSScrappingSaw, + Time:480.0, + Category:LTS-Metal, + Sound:PZ_Fire, + OnGiveXP:CraftXP_Smithing, + } + + /** ------------------------------------------------------------------------- **/ + /** Smithing: Scrapping items (that make sense) into Metal Scrap **/ + + /** Metalworking primary produce should not be scrapable **/ + /** Large and Small Metal Sheet | Metal Bar | Metal Pipe | Nails | Wire **/ + + /** Random Items (1 Scrap) **/ + recipe LTS Scrap Metal { + keep LTSScrappingSaw, + Tweezers/Spoon/TentPeg/Scissors/PopEmpty/PaintbucketEmpty/Hinge/Fork/Doorknob/ButterKnife/KitchenKnife/Hairspray/Screwdriver/TinCanEmpty/TinOpener/Umbrella/HuntingKnife/MeatCleaver, + Result:ScrapMetal, + Time:120.0, + OnGiveXP:CraftXP_Scrapping, + Category:LTS-Metal, + Sound:Sawing, + } + + /** Random Items (2 Scrap) **/ + recipe LTS Scrap Metal { + keep LTSScrappingSaw, + BakingPan/BarbedWire/HandShovel/HandScythe/HandFork/GardenHoe/GardenFork/Golfclub/FishingNet/GridlePan/Kettle/LeadPipe/LeafRake/Machete/Pan/Pot/RoastingPan/Saw/ScrewsBox/TrapCage/Wrench/TirePump/EngineParts/Saucepan, + Result:ScrapMetal=2, + Time:180.0, + OnGiveXP:CraftXP_Scrapping, + Category:LTS-Metal, + Sound:Sawing, + } + + /** Random Items (3 Scrap) **/ + recipe LTS Scrap Metal { + keep LTSScrappingSaw, + Crowbar/Axe/Hammer/HandAxe/Katana/LugWrench/PipeWrench/Shovel/Shovel2/WoodAxe/Sledgehammer/Sledgehammer2/PickAxe/LTSPropaneTankEmpty/EmptyPetrolCan/LTSWaterCanEmpty, + Result:ScrapMetal=3, + Time:240.0, + OnGiveXP:CraftXP_Scrapping, + Category:LTS-Metal, + Sound:Sawing, + } + + /** Random Items (5 Scrap) **/ + recipe LTS Scrap Metal { + keep LTSScrappingSaw, + Jack/LTSWoodBurner, + Result:ScrapMetal=5, + Time:360.0, + OnGiveXP:CraftXP_Scrapping, + Category:LTS-Metal, + Sound:Sawing, + } + + /** Firearms (4 Scrap) **/ + recipe LTS Scrap Metal { + keep LTSScrappingSaw, + AssaultRifle/AssaultRifle2/DoubleBarrelShotgun/HuntingRifle/Pistol/Pistol2/Pistol3/Revolver/Revolver_Long/Revolver_Short/Shotgun/ShotgunSawnoff/VarmintRifle, + Result:ScrapMetal=4, + Time:300.0, + OnGiveXP:CraftXP_Scrapping, + Category:LTS-Metal, + Sound:Sawing, + } + +} diff --git a/media/textures/Item_HackSaw2.png b/media/textures/Item_HackSaw2.png new file mode 100644 index 0000000000000000000000000000000000000000..27b794ed388259db0288bb03ea93ef5c731337f3 GIT binary patch literal 768 zcmV+b1ONPqP)I}>+}R5}0v02y>e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00L-9L_t(o!^KxIZ__{+eP=OQ zVklrS(5e!#6huTAiiA86sY|A|QnG_o6xd-wfo5tU8~gxJGO#yN?TN7+A|x_UR7513 zB|&OrAcLi>WvI@aFBki+xxyz!an8QH=l8wuyF1`N2a$Owx3qY|{tgC1@=pj*;EhT( zF}~N?)kcD(fm7fh@c)kIY^@|n8aNA_xUZ1}VL^kzknrF~hlhy?g!CW}{M_GO3aR6uiFGga~|AigYPKL^)3b*GYnA&_Z!@nF2H)Mfy*|DieMS3GUg~Y;Rl?x^Y_GG6Zm*B;{on99@6VmYOqVxG z769OS{t`Cd_LbAYdui7E%vS8Io5{aKHcd%gF@%XnF&xP|dOYN*mT-|&K z0GT9=tlVzzhxmN?9*&o*N}d?CTbP6)o~^E8?4SDL#>-bz^QHF#jgkekT$3)*+|uI7 z#kF;qmKBdtHCQF2yB77t?OzAD`{Z>h2@1{zCBl<1WC_p`HOn=8eDgFj9j0Z)ppoZd z)NTPloDND*dGU}jCN<$C3=w&5e4jNZ0F2r#7^(!QG0k#KXiSm(Y)ry1@vTgNlBjPr zSqT!RWlg<3jmUFj@G}!&Jplk_xhB1K6pBSeo{PwH=Oe%?alCxGffePRZ`0C^ zNL2~dH6j=ciM9g(AqFaHqJ|HSf?F2-J+4DHmYKuSQe#X8YuzeB$0000