From 6b82dc3de6e19370d10e7446bc1500f4e5fe3fd0 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 12 Nov 2024 03:44:57 -0500 Subject: [PATCH] Adds a new emote: Bonk (#2251) ## About The Pull Request Have you ever wanted to bonk someone on the head? Well now you can with the [*bonk emote](https://www.youtube.com/watch?v=C0XF57pK67g). Just aim at someone's head and hit them with the hand. I'd advise against doing it to borgs or synthetics though.. that sounds painful. ## Why It's Good For The Game More variety of emotes. ## Proof Of Testing It compiled and ran on my end without any runtimes or errors. Everything has been tested to work.
Screenshots/Videos https://github.com/user-attachments/assets/8e1ca604-4bd5-4300-adf6-23b194eea623
## Changelog :cl: add: added a bonk emote sound: added the coconut hit 01 sound effect to the code /:cl: --------- Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com> Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com> --- modular_zubbers/code/modules/emotes/emotes.dm | 14 +++++ .../code/modules/emotes/hand_items.dm | 59 ++++++++++++++++++ .../modules/emotes/sound/effects/bonk.ogg | Bin 0 -> 5757 bytes .../modules/emotes/sound/effects/license.txt | 3 + tgstation.dme | 1 + 5 files changed, 77 insertions(+) create mode 100644 modular_zubbers/code/modules/emotes/hand_items.dm create mode 100644 modular_zubbers/code/modules/emotes/sound/effects/bonk.ogg create mode 100644 modular_zubbers/code/modules/emotes/sound/effects/license.txt diff --git a/modular_zubbers/code/modules/emotes/emotes.dm b/modular_zubbers/code/modules/emotes/emotes.dm index 8845010fca5..c4add4614ac 100644 --- a/modular_zubbers/code/modules/emotes/emotes.dm +++ b/modular_zubbers/code/modules/emotes/emotes.dm @@ -153,3 +153,17 @@ return pick('modular_zubbers/code/modules/emotes/sound/voice/yip1.ogg', 'modular_zubbers/code/modules/emotes/sound/voice/yip2.ogg', 'modular_zubbers/code/modules/emotes/sound/voice/yip2.ogg') + +/datum/emote/living/carbon/bonk + key = "bonk" + key_third_person = "bonks" + hands_use_check = TRUE + +/datum/emote/living/carbon/bonk/run_emote(mob/user, params, type_override, intentional) + . = ..() + if(!length(user.get_empty_held_indexes())) + to_chat(user, span_warning("You don't have any free hands to bonk someone with.")) + return + var/obj/item/hand_item/bonkinghand/bonk = new(user) + if(user.put_in_hands(bonk)) + to_chat(user, span_notice("You ready your hand to bonk someone.")) diff --git a/modular_zubbers/code/modules/emotes/hand_items.dm b/modular_zubbers/code/modules/emotes/hand_items.dm new file mode 100644 index 00000000000..145a7ec3b6b --- /dev/null +++ b/modular_zubbers/code/modules/emotes/hand_items.dm @@ -0,0 +1,59 @@ +/obj/item/hand_item/bonkinghand + name = "bonking hand" + desc = "Time to bonk someone over the head in comedic fashion." + inhand_icon_state = "nothing" + attack_verb_continuous = list("bonks") + attack_verb_simple = list("bonk") + hitsound = 'sound/effects/snap.ogg' + +/obj/item/hand_item/bonkinghand/Initialize(mapload) + . = ..() + +/obj/item/hand_item/bonkinghand/attack(mob/living/bonked, mob/living/carbon/human/user) + var/bonk_volume = 75 + var/obj/item/bodypart/bonkers_hand = user.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm") + var/obj/item/bodypart/head/bonk_victims_head = bonked.get_bodypart(BODY_ZONE_HEAD) + if(user.zone_selected != BODY_ZONE_HEAD) + to_chat(user, span_warning("You can't bonk someone on the head if you aren't aiming for their head!")) + return + + if(issilicon(bonked)) + if(bonkers_hand?.receive_damage( 5, 0 )) // 5 brute damage + user.update_damage_overlays() + user.visible_message( + span_danger("[user] bonks [bonked] on the head, leaving their hand red and swollen!"), + span_notice("You bonk [bonked] on the head, but hurt your hand on the metal of their head!"), + span_hear("You hear a comedic metallic bonk."), + ) + playsound(bonked, 'sound/items/weapons/smash.ogg', bonk_volume, TRUE, -1) + + else if(bonk_victims_head) + if(bonk_victims_head.biological_state & BIO_METAL) + if(bonkers_hand?.receive_damage( 5, 0 )) // 5 brute damage + user.update_damage_overlays() + user.visible_message( + span_danger("[user] bonks [bonked] on the head, leaving their hand red and swollen!"), + span_notice("You bonk [bonked] on the head, but hurt your hand on the metal of their head!"), + span_hear("You hear a comedic metallic bonk."), + ) + playsound(bonked, 'sound/items/weapons/smash.ogg', bonk_volume, FALSE, -1) + + else + user.visible_message( + span_danger("[user] bonks [bonked] on the head!"), + span_notice("You bonk [bonked] on the head!"), + span_hear("You hear a comedic bonking sound."), + ) + playsound(bonked, 'modular_zubbers/code/modules/emotes/sound/effects/bonk.ogg', bonk_volume, FALSE, -1) + else + to_chat(user, span_warning("You can't bonk someone on the head if they have no head!")) + return + qdel(src) +// Successful takes will qdel our hand after +/obj/item/hand_item/bonkinghand/on_offer_taken(mob/living/carbon/offerer, mob/living/carbon/taker) + . = ..() + if(!.) + return + + qdel(src) + diff --git a/modular_zubbers/code/modules/emotes/sound/effects/bonk.ogg b/modular_zubbers/code/modules/emotes/sound/effects/bonk.ogg new file mode 100644 index 0000000000000000000000000000000000000000..aff682731bdcbe64f30b8662a942690abeb23fe3 GIT binary patch literal 5757 zcmeHLc~n!^y5E5S5di@M1_VqL3* z`S$N*e?){gPyp+#Cn&)JnNAuq6gq>E0f1;UN`xyn@CArKt-*m$lH4q2%adzx2Zj>o@No7FA2F1;!356o?Pi5Z`P4P4MiK?#OUJt8 zCZ5N^S*-z_)g!Yw>Q!OVh#j0g$DiaRHSa{IxCo7;jffT*qHht=oVWAp#2TNRS$@ky z)XQh_)LGr+W<(2oG+0~1)5CN?0RWX%1YWHCbG3cA+(Dpw)b^b+N-zF767zCtldw30M`mTo?eD zL*(2V+x(~gLP>&Uo(pb0A!HEaEc#7fFbDX zIi2HZA5_(48fZBgGDn;mBqttGvP?qndN(>^2wyJkc|CJ%X)Oer0EA#|1?jyc3?Y+? z-R_)NhljIgB>#c5ITGgK2~Fm;@?(S7p@iHOaF3n%Oid=_fj3I6h~rABE8*r+dJU3? zsJ-|TYP7k^LQh72t-X1N_bVHlkCd-pAI#NROs50Dt-H38Gzzu6E z>xC7-ADD@iD@}s>4A!;Ng}xjN&P}|w?g~D%SdNWIJ0$p@A<}k_bTqQ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@4;IXhWb;X)NVn0gFZIc|&(Jm$2#RHpc7 zQQS&={iN8hsWy){P_#)uvS(qo>vR8^=!J}ol541@I!m%3XRF-rKS-q*;NXMi`&_(I zZ{zLpb$_R`nGaDX#kjOzMCtLl%UP;<6=_;LlqbOhQOfCxG;76Mn?}FvA=<_NEvSq9 zX-D_--t%1~=8K-wTXq1WGBcH)>=Wm-Z`BQSUHb9RdGtj^fa#pS?9mXBi2|L6FpiEu zS%L3tpt$f^+QW*DWNLr5>#sx=<80i*h0#Ts+Kcyr`X_MUD42=i|t$l;3)saN8Y8*@Qqf^Q86d{L^eg?W5i)` zUNw}tE7wzowL#ay(2_+IG2m{hC?mh$b(~VTY$j_ObaI$I`Mk-GHWOobmg|!e$gmCY1>x+W6#DYPR;kR5kY<_?=tRR?^)5k%5`SfHxo1P&Dh&2+9qsFv&zoK z(9e}$?cDWZKVx#bQP%PDVZ5Jz;%(2`d$<{P@``W?KOGo}y)f6X#IPg^NGG)j9U~?S|sCGpLTdmTu?xuHf;6 z#n0wv8!zg)7W$WMF=DVz*UsDUKQ;U?c?V5_^1n-^3INY7sP?b@f^?|`mE+T}D<~=w zSbde-c<6~_PxubZAWeIj@}1j@C{nh*eiknh7H+o6TV zRM#Ho++crjqf`&;f&yiwj)_=+WZUeka^GqW05pAPk`_Bq8aMHFD9n}3#ckiNR+QUk z>sd;DqE<<|kV2;?hvln>aw^)dJbZcYCedlsUH7p%dzWg$16!A^XpPbI%U%2fm*4!H zB4}tI?6SKG{(db0?XqIvuyp)^c?R*QM&;+*VBzY%;Owgk9Q;%?_4JCSWy4o+b^9ri z3?Kbk$4TCAO5pfX_lBDRe-ZpNVB}(8;1afJyIt5r@HirG`nA=&x`7`r_pG{pG~GC( Gq52QC_s}u` literal 0 HcmV?d00001 diff --git a/modular_zubbers/code/modules/emotes/sound/effects/license.txt b/modular_zubbers/code/modules/emotes/sound/effects/license.txt new file mode 100644 index 00000000000..90931105d94 --- /dev/null +++ b/modular_zubbers/code/modules/emotes/sound/effects/license.txt @@ -0,0 +1,3 @@ +bonk.ogg is Coconut Hit 01 from the Hanna-Barbera Sound Effects Library +(https://archive.org/details/hanna-barbera-cartoon-sound-fx-fixed-album) +It has been licensed under CC-BY 3.0, which can be found at http://creativecommons.org/licenses/by/3.0/ diff --git a/tgstation.dme b/tgstation.dme index 772e395b5d3..72e24c6c774 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9002,6 +9002,7 @@ #include "modular_zubbers\code\modules\dna_vault\vault_mutation.dm" #include "modular_zubbers\code\modules\dynamic\midround_rulesets.dm" #include "modular_zubbers\code\modules\emotes\emotes.dm" +#include "modular_zubbers\code\modules\emotes\hand_items.dm" #include "modular_zubbers\code\modules\emotes\scream_datums.dm" #include "modular_zubbers\code\modules\emotes\species_screams.dm" #include "modular_zubbers\code\modules\emotes\synth_emotes.dm"