mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Pops up a little bubble when you're requesting a high-five, along with some other emotes (#20472)
* High five! * Add in-hand use * use in hand too * closing remarks * better looking * Fixes daps * grab my hand fat man * hand shake * Implement missed messages * i can spell * Update code/modules/mob/living/carbon/human/human_emote.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Review concerns * Add some auto-doc, minor changes * more cleverly handles pointing * Update code/modules/point/point.dm Path clarity Co-authored-by: Farie82 <farie82@users.noreply.github.com> --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
@@ -55,14 +55,6 @@
|
||||
muzzled_noises = list("weak", "pathetic", "sad")
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/carbon/human/dap
|
||||
key = "dap"
|
||||
key_third_person = "daps"
|
||||
message = "sadly can't find anybody to give daps to, and daps themself. Shameful."
|
||||
message_param = "give daps to %t."
|
||||
emote_target_type = EMOTE_TARGET_MOB
|
||||
hands_use_check = TRUE
|
||||
|
||||
/datum/emote/living/carbon/human/eyebrow
|
||||
key = "eyebrow"
|
||||
message = "raises an eyebrow."
|
||||
@@ -283,9 +275,10 @@
|
||||
/datum/emote/living/carbon/human/highfive
|
||||
key = "highfive"
|
||||
key_third_person = "highfives"
|
||||
message = "requests a highfive."
|
||||
hands_use_check = TRUE
|
||||
cooldown = 3 SECONDS
|
||||
cooldown = 5 SECONDS
|
||||
/// Status effect to apply when this emote is used. Should be a subtype
|
||||
var/status = STATUS_EFFECT_HIGHFIVE
|
||||
|
||||
/datum/emote/living/carbon/human/highfive/can_run_emote(mob/user, status_check, intentional)
|
||||
. = ..()
|
||||
@@ -293,81 +286,24 @@
|
||||
if(user_carbon.restrained())
|
||||
return FALSE
|
||||
|
||||
/datum/emote/living/carbon/human/highfive/proc/wiz_cleanup(mob/user, mob/highfived)
|
||||
user.status_flags &= ~GODMODE
|
||||
highfived.status_flags &= ~GODMODE
|
||||
|
||||
/datum/emote/living/carbon/human/highfive/run_emote(mob/user, params, type_override, intentional)
|
||||
var/mob/living/carbon/user_carbon = user
|
||||
if(user_carbon.has_status_effect(STATUS_EFFECT_HIGHFIVE))
|
||||
user.visible_message("[user.name] shakes [user.p_their()] hand around slightly, impatiently waiting for someone to high-five them.")
|
||||
if(user_carbon.has_status_effect(status))
|
||||
user.visible_message("[user.name] shakes [user.p_their()] hand around slightly, impatiently waiting for someone to [key].")
|
||||
return TRUE
|
||||
user_carbon.apply_status_effect(STATUS_EFFECT_HIGHFIVE)
|
||||
for(var/mob/living/L in orange(1))
|
||||
if(L.has_status_effect(STATUS_EFFECT_HIGHFIVE) && L != user)
|
||||
if(iswizard(user) && iswizard(L))
|
||||
user.visible_message("<span class='biggerdanger'><b>[user.name]</b> and <b>[L.name]</b> high-five EPICALLY!</span>")
|
||||
user_carbon.status_flags |= GODMODE
|
||||
L.status_flags |= GODMODE
|
||||
explosion(get_turf(user), 5, 2, 1, 3)
|
||||
// explosions have a spawn so this makes sure that we don't get gibbed
|
||||
addtimer(CALLBACK(src, PROC_REF(wiz_cleanup), user_carbon, L), 1)
|
||||
user_carbon.remove_status_effect(STATUS_EFFECT_HIGHFIVE)
|
||||
L.remove_status_effect(STATUS_EFFECT_HIGHFIVE)
|
||||
return TRUE
|
||||
user.visible_message("<b>[user.name]</b> and <b>[L.name]</b> high-five!")
|
||||
playsound(user, 'sound/effects/snap.ogg', 50)
|
||||
user_carbon.remove_status_effect(STATUS_EFFECT_HIGHFIVE)
|
||||
L.remove_status_effect(STATUS_EFFECT_HIGHFIVE)
|
||||
return TRUE
|
||||
user_carbon.apply_status_effect(status)
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/emote/living/carbon/human/handshake
|
||||
/datum/emote/living/carbon/human/highfive/dap
|
||||
key = "dap"
|
||||
status = STATUS_EFFECT_DAP
|
||||
key_third_person = "daps"
|
||||
|
||||
/datum/emote/living/carbon/human/highfive/handshake
|
||||
key = "handshake"
|
||||
message = "holds out their hand."
|
||||
hands_use_check = TRUE
|
||||
emote_target_type = EMOTE_TARGET_MOB
|
||||
target_behavior = EMOTE_TARGET_BHVR_DEFAULT_TO_BASE
|
||||
|
||||
/datum/emote/living/carbon/human/handshake/act_on_target(mob/user, target)
|
||||
. = ..()
|
||||
if(!target)
|
||||
user.visible_message(
|
||||
"[user] seems to shake hands with empty space.",
|
||||
"You shake the air's hand."
|
||||
)
|
||||
return EMOTE_ACT_STOP_EXECUTION
|
||||
|
||||
if(!user.Adjacent(target) || !ishuman(target))
|
||||
message_param = "extends a hand towards %t."
|
||||
return TRUE
|
||||
|
||||
var/mob/living/carbon/human/human_target = target
|
||||
|
||||
if(!HAS_TRAIT(human_target, TRAIT_HANDS_BLOCKED) && !human_target.r_hand && !human_target.restrained())
|
||||
message_param = "shakes hands with %t."
|
||||
else
|
||||
message_param = "holds out [user.p_their()] hand to %t."
|
||||
|
||||
/datum/emote/living/carbon/human/handshake/run_emote(mob/user, params, type_override, intentional)
|
||||
var/mob/living/target
|
||||
for(var/mob/living/A in oview(5, user))
|
||||
if(params == A.name)
|
||||
target = A
|
||||
|
||||
if(!target)
|
||||
user.visible_message(
|
||||
"[user] seems to shake hands with empty space.",
|
||||
"You shake the air's hand."
|
||||
)
|
||||
return TRUE
|
||||
|
||||
if(!HAS_TRAIT(target, TRAIT_HANDS_BLOCKED) && !target.r_hand && !target.restrained())
|
||||
message_param = "shakes hands with %t."
|
||||
else
|
||||
message_param = "holds out [user.p_their()] hand to %t."
|
||||
|
||||
return ..()
|
||||
key_third_person = "handshakes"
|
||||
status = STATUS_EFFECT_HANDSHAKE
|
||||
|
||||
/datum/emote/living/carbon/human/snap
|
||||
key = "snap"
|
||||
|
||||
Reference in New Issue
Block a user