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:
Luc
2023-03-15 15:37:54 -04:00
committed by GitHub
parent 9838d84023
commit eafe04f41f
6 changed files with 159 additions and 103 deletions
+2 -2
View File
@@ -338,7 +338,7 @@
name = "Cry"
/datum/keybinding/emote/carbon/human/dap
linked_emote = /datum/emote/living/carbon/human/dap
linked_emote = /datum/emote/living/carbon/human/highfive/dap
name = "Dap"
/datum/keybinding/emote/carbon/human/eyebrow
@@ -418,7 +418,7 @@
name = "High Five"
/datum/keybinding/emote/carbon/human/handshake
linked_emote = /datum/emote/living/carbon/human/handshake
linked_emote = /datum/emote/living/carbon/human/highfive/handshake
name = "Handshake"
/datum/keybinding/emote/carbon/human/snap
+84 -11
View File
@@ -47,25 +47,98 @@
/datum/status_effect/high_five
id = "high_five"
duration = 5 SECONDS
duration = 10 SECONDS
alert_type = null
status_type = STATUS_EFFECT_REFRESH
/// Message displayed when wizards perform this together
var/critical_success = "high-five EPICALLY!"
/// Message displayed when normal people perform this together
var/success = "high-five!"
/// Message displayed when this status effect is applied.
var/request = "requests a high-five."
/// Item to be shown in the pop-up balloon.
var/obj/item/item_path = /obj/item/latexballon
/// Sound effect played when this emote is completed.
var/sound_effect = 'sound/weapons/slap.ogg'
/// So we don't leave folks with god-mode
/datum/status_effect/high_five/proc/wiz_cleanup(mob/user, mob/highfived)
user.status_flags &= ~GODMODE
highfived.status_flags &= ~GODMODE
/datum/status_effect/high_five/on_apply()
if(!iscarbon(owner))
return FALSE
. = ..()
var/mob/living/carbon/user = owner
var/is_wiz = iswizard(user)
for(var/mob/living/carbon/C in orange(1, user))
if(!C.has_status_effect(type) || C == user)
continue
if(is_wiz && iswizard(C))
user.visible_message("<span class='biggerdanger'><b>[user.name]</b> and <b>[C.name]</b> [critical_success]</span>")
user.status_flags |= GODMODE
C.status_flags |= GODMODE
explosion(get_turf(user), 5, 2, 1, 3, cause = id)
// explosions have a spawn so this makes sure that we don't get gibbed
addtimer(CALLBACK(src, PROC_REF(wiz_cleanup), user, C), 1)
add_attack_logs(user, C, "caused a wizard [id] explosion")
user.remove_status_effect(type)
C.remove_status_effect(type)
user.do_attack_animation(C, no_effect = TRUE)
C.do_attack_animation(user, no_effect = TRUE)
user.visible_message("<span class='notice'><b>[user.name]</b> and <b>[C.name]</b> [success]</span>")
playsound(user, sound_effect, 80)
user.remove_status_effect(type)
C.remove_status_effect(type)
return FALSE
owner.custom_emote(EMOTE_VISIBLE, request)
owner.create_point_bubble_from_path(item_path, FALSE)
/datum/status_effect/high_five/on_timeout()
owner.visible_message("[owner] [get_missed_message()]")
/datum/status_effect/high_five/proc/get_missed_message()
var/list/missed_highfive_messages = list(
"it looks like [owner.p_they()] [owner.p_were()] left hanging...",
"seeming to wave at nobody in particular.",
"moving [owner.p_their()] hand directly to [owner.p_their()] forehead in shame.",
"fully committing and high-fiving empty space.",
"high-fiving [owner.p_their()] other hand shamefully before wiping away a tear.",
"going for a handshake, then a fistbump, before pulling [owner.p_their()] hand back...? What [owner.p_are()] [owner.p_they()] doing?"
"lowers [owner.p_their()] hand, it looks like [owner.p_they()] [owner.p_were()] left hanging...",
"seems to awkwardly wave at nobody in particular.",
"moves [owner.p_their()] hand directly to [owner.p_their()] forehead in shame.",
"fully commits and high-fives empty space.",
"high-fives [owner.p_their()] other hand shamefully before wiping away a tear.",
"goes for a handshake, then a fistbump, before pulling [owner.p_their()] hand back...? <i>What [owner.p_are()] [owner.p_they()] doing?</i>"
)
return pick(missed_highfive_messages)
/datum/status_effect/high_five/on_timeout()
// show some emotionally damaging failure messages
// high risk, high reward
owner.visible_message("[owner] awkwardly lowers [owner.p_their()] hand, [get_missed_message()]")
/datum/status_effect/high_five/dap
id = "dap"
critical_success = "dap each other up EPICALLY!"
success = "dap each other up!"
request = "requests someone to dap them up!"
sound_effect = 'sound/effects/snap.ogg'
item_path = /obj/item/melee/touch_attack/fake_disintegrate // EI-NATH!
/datum/status_effect/high_five/dap/get_missed_message()
return "sadly can't find anybody to give daps to, and daps [owner.p_themselves()]. Shameful."
/datum/status_effect/high_five/handshake
id = "handshake"
critical_success = "give each other an EPIC handshake!"
success = "give each other a handshake!"
request = "requests a handshake!"
sound_effect = "sound/weapons/thudswoosh.ogg"
/datum/status_effect/high_five/handshake/get_missed_message()
var/list/missed_messages = list(
"drops [owner.p_their()] hand, shamefully.",
"grabs [owner.p_their()] outstretched hand with [owner.p_their()] other hand and gives [owner.p_themselves()] a handshake.",
"balls [owner.p_their()] hand into a fist, slowly bringing it back in."
)
return pick(missed_messages)
/datum/status_effect/charging
id = "charging"