Moves clap emote from carbon to human emotes (#22182)

* moving day

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* review fixes

---------

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Burzah
2023-09-07 03:09:15 -07:00
committed by GitHub
parent d540f421f4
commit 2484b29780
3 changed files with 42 additions and 37 deletions
@@ -11,38 +11,6 @@
key = "blink_r"
message = "blinks rapidly."
/datum/emote/living/carbon/clap
key = "clap"
key_third_person = "claps"
message = "claps."
message_mime = "claps silently."
message_param = "claps at %t."
emote_type = EMOTE_SOUND
vary = TRUE
/datum/emote/living/carbon/clap/run_emote(mob/user, params, type_override, intentional)
var/mob/living/carbon/human/H = user
if(!H.bodyparts_by_name[BODY_ZONE_L_ARM] || !H.bodyparts_by_name[BODY_ZONE_R_ARM])
if(!H.bodyparts_by_name[BODY_ZONE_L_ARM] && !H.bodyparts_by_name[BODY_ZONE_R_ARM])
// no arms...
to_chat(user, "<span class='warning'>You need arms to be able to clap.</span>")
else
// well, we've got at least one
user.visible_message("[user] makes the sound of one hand clapping.")
return TRUE
return ..()
/datum/emote/living/carbon/clap/get_sound(mob/living/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H?.mind?.miming)
return pick(
'sound/misc/clap1.ogg',
'sound/misc/clap2.ogg',
'sound/misc/clap3.ogg',
'sound/misc/clap4.ogg')
/datum/emote/living/carbon/cross
key = "cross"
key_third_person = "crosses"
@@ -37,6 +37,44 @@
emote_type = EMOTE_VISIBLE
hands_use_check = TRUE
/datum/emote/living/carbon/human/clap
key = "clap"
key = "clap"
key_third_person = "claps"
message = "claps."
message_mime = "claps silently."
message_param = "claps at %t."
emote_type = EMOTE_SOUND
vary = TRUE
/datum/emote/living/carbon/human/clap/run_emote(mob/user, params, type_override, intentional)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(!H.bodyparts_by_name[BODY_ZONE_L_ARM] || !H.bodyparts_by_name[BODY_ZONE_R_ARM])
if(!H.bodyparts_by_name[BODY_ZONE_L_ARM] && !H.bodyparts_by_name[BODY_ZONE_R_ARM])
// no arms...
to_chat(user, "<span class='warning'>You need arms to be able to clap.</span>")
else
// well, we've got at least one
user.visible_message("[user] makes the sound of one hand clapping.")
return TRUE
return ..()
/datum/emote/living/carbon/human/clap/get_sound(mob/living/user)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(!H.mind?.miming)
return pick(
'sound/misc/clap1.ogg',
'sound/misc/clap2.ogg',
'sound/misc/clap3.ogg',
'sound/misc/clap4.ogg')
/datum/emote/living/carbon/human/crack
key = "crack"
key_third_person = "cracks"
@@ -779,4 +817,3 @@
var/obj/item/organ/external/bodypart = pick(H.bodyparts)
message = "cracks their [bodypart.name]!"
. = ..()