From ec797a245d83577be71e6ad9f89f76af870ae7d0 Mon Sep 17 00:00:00 2001 From: saibotk Date: Sat, 30 May 2020 15:56:35 +0200 Subject: [PATCH] Code commit --- addon.json | 16 +++++ .../entities/items/item_ttt_silentstep.lua | 57 ++++++++++++++++++ materials/vgui/ttt/icon_silentstep.vmt | 7 +++ materials/vgui/ttt/icon_silentstep.vtf | Bin 0 -> 2952 bytes materials/vgui/ttt/perks/hud_silentstep.png | Bin 0 -> 6264 bytes 5 files changed, 80 insertions(+) create mode 100644 addon.json create mode 100644 lua/terrortown/entities/items/item_ttt_silentstep.lua create mode 100644 materials/vgui/ttt/icon_silentstep.vmt create mode 100644 materials/vgui/ttt/icon_silentstep.vtf create mode 100644 materials/vgui/ttt/perks/hud_silentstep.png diff --git a/addon.json b/addon.json new file mode 100644 index 0000000..ad41b6f --- /dev/null +++ b/addon.json @@ -0,0 +1,16 @@ +{ + "ignore": [ + ".git/*", + ".gitignore", + ".gitattributes", + "README.md", + "LICENSE", + "out.gma" + ], + "tags": [ + "fun" + ], + "title": "TTT-Silentstep", + "type": "tool", + "workshopid": 1137482209 +} diff --git a/lua/terrortown/entities/items/item_ttt_silentstep.lua b/lua/terrortown/entities/items/item_ttt_silentstep.lua new file mode 100644 index 0000000..a3b47b6 --- /dev/null +++ b/lua/terrortown/entities/items/item_ttt_silentstep.lua @@ -0,0 +1,57 @@ +if SERVER then + AddCSLuaFile() + + resource.AddFile("materials/vgui/ttt/icon_silentstep.vmt") + resource.AddFile("materials/vgui/ttt/perks/hud_silentstep.png") + + util.AddNetworkString("TTTSilentstepBought") +end + +ITEM.hud = Material("vgui/ttt/perks/hud_silentstep.png") +ITEM.EquipMenuData = { + type = "item_passive", + name = "item_silentstep_name", + desc = "item_silentstep_desc" +} +ITEM.material = "vgui/ttt/icon_silentstep" +ITEM.CanBuy = {ROLE_TRAITOR, ROLE_DETECTIVE} + +if SERVER then + function ITEM:Bought(ply) + net.Start("TTTSilentstepBought") + net.WriteEntity(ply) + net.Broadcast() + end +else + hook.Add("TTT2Initialize", "TTTItemSilentStepLang", function() + LANG.AddToLanguage("English", "item_silentstep_name", "Silent Step") + LANG.AddToLanguage("English", "item_silentstep_desc", "Silent Step Perk.\nLets you walk like a ninja without any steps!") + end) + + net.Receive("TTTSilentstepBought", function() + local ply = net.ReadEntity() + + if ply == LocalPlayer() then return end + + if not ply:HasEquipmentItem("item_ttt_silentstep") then + ply.equipmentItems = ply.equipmentItems or {} + ply.equipmentItems[#ply.equipmentItems + 1] = "item_ttt_silentstep" + end + end) + + hook.Add("TTTEndRound", "TTTSilentStepCleanUp", function() + local lcply = LocalPlayer() + + for _, v in ipairs(player.GetAll()) do + if v ~= lcply then + v.equipmentItems = {} + end + end + end) +end + +hook.Add("PlayerFootstep", "TTTSilentStepNoSound", function(ply) + if ply:HasEquipmentItem("item_ttt_silentstep") then + return true + end +end) diff --git a/materials/vgui/ttt/icon_silentstep.vmt b/materials/vgui/ttt/icon_silentstep.vmt new file mode 100644 index 0000000..97664f5 --- /dev/null +++ b/materials/vgui/ttt/icon_silentstep.vmt @@ -0,0 +1,7 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui/ttt/icon_silentstep" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 +} diff --git a/materials/vgui/ttt/icon_silentstep.vtf b/materials/vgui/ttt/icon_silentstep.vtf new file mode 100644 index 0000000000000000000000000000000000000000..3ff56ec17d288f4651041eb196802f3fad1b0483 GIT binary patch literal 2952 zcmc&$ZEREL6+U*bxDK*NDw2>66@r#YF{Bw+H3;7UPOh{foJd*YH$l~fIDu)5kIcnn zkl^48S+<6XMB3~&V@pW8QU#mD-BweSfn#W;t&?ahEjK|`ngrB}E}^p{NE}ha-8udk z>!kkJpY4t8C+EHIInVicUfZ>{@56Ec(Bi8aUl#nMrAfX6yjoqnUETSk?SC&H+@9K! zcNp-W<@A=5lR1_?4KVrf-<}2A!-vm}#x$U+?&n4ytOuqx@0iHez{vIB-k}mr;<6+a zRG#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A2bsMf&g|ZyRz7&C8kNg;~v$OLC z%}0Za;xwLgA9~8)oUH#>)(C&%gv(Whyt<1_rTTlOnA(N?!0#oM7m&BRnH@;;lFpbC zJV)ofILDZ|%2--j=ASn=au&z!f&kyhePFRyck>n84YAP?;XlmLWN88GG0SJ(n(d9A zOV`g1lm4C781G8B5;1d=aqp>_{s3QPWU3FE_;R{#)pI4OdMO{KYjabh$z|KX^%BmW%zoiTdk}9!c}3>i;G7Uvf#4 zxk7}`e)rKp1ocCWruw8hhWbNZ<}Gf*e(H4vV=?nwk;T$@@F{-Lx`ad+Eg zp!u|)QzX(m)lWR&N&w}%JE+CJ{f^V)R?OVZFI*4!W9A6IVx_j9zQ5$K-O?L9oUVUW zl7AE4tAu2;5s$+jMjonHd7kuxUxyecz^fyEHNrRXr%nv?A2IIZ92ma|&(Tl9h`Ebz zR=>I%;k)>{KlzMFUUk?s*8xlT?ZY@5 f(GI)YqSiG3?~xy%E&5RjQ~!4uihs1puma$p$)#!Z literal 0 HcmV?d00001 diff --git a/materials/vgui/ttt/perks/hud_silentstep.png b/materials/vgui/ttt/perks/hud_silentstep.png new file mode 100644 index 0000000000000000000000000000000000000000..f7431849e03aaed3ab1712a4f78c118a585ad2ec GIT binary patch literal 6264 zcmX9?WmFYR*B!b+x}-ZVjdV(flz@mdTsoxl(jk)45`wgZG|~-H(%mH>@X!t4eb=|w znmO}h)~s{RoY}KyqTgsJ;$Tu>0swH7mE^VIR{DPp9Tnb}*}AU64Tg)7;YR?l2>;g* zK;~C605COe<>cPHfjYZ8e}p=_&??Kx(Ym-fTiZHV0pPuutz)CBvri&%y?P<58U_2J z>a0zSPOB~Z2}YF2%ua{#LM4js+XAsx7yj$l$drS5QAlxduvlU(PV5-Wd9-c1{J7A9 zsF>gP8-4}$v#r;=qfhm7l6ybSvunrEI?=IHmH4#;Vc4az)cEV61HJtl+uYK@n2avq z1$wO|-N#1;1aK25F3v&UiPjDfyr;0xL8p3FC(p~sXS@U1jQ0qzFoaI`#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