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 00000000000..aff682731bd Binary files /dev/null and b/modular_zubbers/code/modules/emotes/sound/effects/bonk.ogg differ 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"