mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
* Suicide act emote and tweaks * Some logging * Fixes this * Fixes fueltanks Co-authored-by: SECBATON GRIFFON <sage>
389 lines
11 KiB
Plaintext
389 lines
11 KiB
Plaintext
/* EMOTE DATUMS */
|
|
/datum/emote/living
|
|
mob_type_allowed_typelist = list(/mob/living)
|
|
mob_type_blacklist_typelist = list(/mob/living/simple_animal/slime, /mob/living/carbon/brain, /mob/living/silicon/ai, /mob/living/silicon/pai)
|
|
|
|
/datum/emote/living/bow
|
|
key = "bow"
|
|
key_third_person = "bows"
|
|
message = "bows."
|
|
message_param = "bows to %t."
|
|
restraint_check = TRUE
|
|
|
|
/datum/emote/living/cross
|
|
key = "cross"
|
|
key_third_person = "crosses"
|
|
key_shorthand = "cro"
|
|
message = "crosses their arms."
|
|
message_mommi = "crosses their utility arms."
|
|
restraint_check = TRUE
|
|
|
|
/datum/emote/living/collapse
|
|
key = "collapse"
|
|
key_third_person = "collapses"
|
|
key_shorthand = "col"
|
|
message = "collapses!"
|
|
emote_type = EMOTE_AUDIBLE
|
|
|
|
/datum/emote/living/glare
|
|
key = "glare"
|
|
key_third_person = "glares"
|
|
key_shorthand = "gla"
|
|
message = "glares."
|
|
message_mommi = "glares as best a robot spider can glare."
|
|
message_param = "glares at %t."
|
|
emote_type = EMOTE_AUDIBLE
|
|
|
|
/datum/emote/living/collapse/run_emote(mob/user, params)
|
|
. = ..()
|
|
if(. && isliving(user))
|
|
var/mob/living/L = user
|
|
L.Knockdown(10)
|
|
L.Stun(10)
|
|
|
|
/datum/emote/living/dance
|
|
key = "dance"
|
|
key_third_person = "dances"
|
|
key_shorthand = "dan"
|
|
message = "dances around happily."
|
|
restraint_check = TRUE
|
|
|
|
/datum/emote/living/dance/cult
|
|
key = "cultdance"
|
|
key_third_person = "cultdances"
|
|
key_shorthand = "cultd"
|
|
message = "displays the dance of their people."
|
|
restraint_check = TRUE
|
|
replace_pronouns = FALSE
|
|
|
|
/datum/emote/living/dance/cult/can_run_emote(var/mob/user, var/status_check)
|
|
if (user.occult_muted())
|
|
return FALSE
|
|
if (iscultist(user) || istype(user, /mob/living/simple_animal/astral_projection))
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/datum/emote/living/dance/cult/run_emote(mob/living/user, params)
|
|
. = ..()
|
|
if (.)
|
|
for (var/obj/effect/cult_ritual/dance/dance_center in range(1,get_turf(user)))
|
|
dance_center.add_dancer(user)
|
|
return
|
|
new /obj/effect/cult_ritual/dance(get_step(user,user.dir), user)
|
|
|
|
/datum/emote/living/deathgasp
|
|
key = "deathgasp"
|
|
key_third_person = "deathgasps"
|
|
message = "seizes up and falls limp, their eyes dead and lifeless..."
|
|
message_robot = "shudders violently for a moment before falling still, its eyes slowly darkening."
|
|
message_AI = "lets out a flurry of sparks, its screen flickering as its systems slowly halt."
|
|
message_alien = "lets out a waning guttural screech, green blood bubbling from its maw..."
|
|
message_larva = "lets out a sickly hiss of air and falls limply to the floor..."
|
|
message_pulsedemon = "fizzles out into faint sparks, leaving only a slight trail of smoke..."
|
|
message_monkey = "lets out a faint chimper as it collapses and stops moving..."
|
|
message_simple = "stops moving..."
|
|
stat_allowed = UNCONSCIOUS
|
|
mob_type_blacklist_typelist = list(/mob/living/carbon/brain) // Everyone can deathgasp
|
|
|
|
/datum/emote/living/deathgasp/run_emote(mob/living/user, params)
|
|
if(/datum/dna/gene/disability/elvis in user.active_genes)
|
|
user.emote("fart", ignore_status = 1)
|
|
message = "has left the building..."
|
|
if(!issilent(user) && (M_HARDCORE in user.mutations))
|
|
message = "whispers with their final breath, <i>'i told u i was hardcore..'</i>"
|
|
. = ..()
|
|
if(params && isalienadult(user))
|
|
playsound(user.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
|
|
if (. && user.stat == UNCONSCIOUS && !params)
|
|
user.succumb_proc(0, 1)
|
|
message = initial(message)
|
|
|
|
/datum/emote/living/suicide
|
|
key = "suicide"
|
|
key_third_person = "suicides"
|
|
mob_type_blacklist_typelist = list(/mob/living/carbon/brain) // Everyone can release themselves from their mortal coil and taste sweet death
|
|
|
|
/datum/emote/living/suicide/run_emote(mob/living/user, params)
|
|
. = ..()
|
|
if (. && user.stat == UNCONSCIOUS && !params)
|
|
user.succumb_proc(0, 1)
|
|
return
|
|
user.attempt_suicide(0, 1)
|
|
|
|
/datum/emote/living/carbon/drool
|
|
key = "drool"
|
|
key_third_person = "drools"
|
|
key_shorthand = "dro"
|
|
message = "drools."
|
|
|
|
/datum/emote/living/faint
|
|
key = "faint"
|
|
key_third_person = "faints"
|
|
key_shorthand = "fai"
|
|
message = "faints."
|
|
|
|
/datum/emote/living/faint/run_emote(mob/user, params)
|
|
. = ..()
|
|
if(. && isliving(user))
|
|
var/mob/living/L = user
|
|
L.sleeping += 10 // You can't faint when you're asleep.
|
|
|
|
var/list/animals_with_wings = list(
|
|
/mob/living/simple_animal/parrot,
|
|
/mob/living/simple_animal/bee,
|
|
/mob/living/simple_animal/penguin,
|
|
/mob/living/simple_animal/chick,
|
|
/mob/living/simple_animal/chicken,
|
|
/mob/living/simple_animal/hostile/retaliate/cockatrice,
|
|
/mob/living/simple_animal/hostile/scarybat,
|
|
/mob/living/simple_animal/hostile/bigroach,
|
|
/mob/living/simple_animal/hostile/viscerator,
|
|
)
|
|
|
|
/datum/emote/living/flap
|
|
key = "flap"
|
|
key_third_person = "flaps"
|
|
message = "flaps their wings."
|
|
message_mommi = "flaps its utility arms as though they were wings."
|
|
restraint_check = TRUE
|
|
|
|
/datum/emote/living/flap/aflap
|
|
key = "aflap"
|
|
key_third_person = "aflaps"
|
|
message = "flaps their wings ANGRILY!"
|
|
message_mommi = "flaps its utility arms ANGRILY!"
|
|
|
|
/datum/emote/living/flap/can_run_emote(var/mob/user, var/status_check)
|
|
if (isMoMMI(user))
|
|
return TRUE
|
|
if (is_type_in_list(user,animals_with_wings))
|
|
return TRUE
|
|
if (ishuman(user))
|
|
var/mob/living/carbon/human/H = user
|
|
if (isvox(H) || isskelevox(H))
|
|
return TRUE
|
|
if(H.is_wearing_item(/obj/item/clothing/suit/clownpiece, slot_wear_suit))
|
|
return TRUE
|
|
|
|
/datum/emote/living/flap/run_emote(mob/user, params)
|
|
. = ..()
|
|
if(. && ishuman(user))
|
|
var/mob/living/carbon/human/H = user
|
|
var/obj/item/clothing/suit/clownpiece/wings = H.is_wearing_item(/obj/item/clothing/suit/clownpiece, slot_wear_suit)
|
|
if(wings)
|
|
wings.icon_state = "clownpiece-fly"
|
|
H.update_inv_wear_suit(1)
|
|
spawn(5)
|
|
wings.icon_state = initial(wings.icon_state)
|
|
H.update_inv_wear_suit(1)
|
|
|
|
/datum/emote/living/frown
|
|
key = "frown"
|
|
key_third_person = "frowns"
|
|
key_shorthand = "fro"
|
|
message = "frowns."
|
|
|
|
/datum/emote/living/jump
|
|
key = "jump"
|
|
key_third_person = "jumps"
|
|
message = "jumps!"
|
|
restraint_check = TRUE
|
|
|
|
/datum/emote/living/laugh/can_run_emote(mob/living/user, var/status_check = TRUE)
|
|
. = ..()
|
|
if(. && iscarbon(user))
|
|
var/mob/living/carbon/C = user
|
|
return !C.silent
|
|
|
|
/datum/emote/living/look
|
|
key = "look"
|
|
key_third_person = "looks"
|
|
message = "looks."
|
|
message_param = "looks at %t."
|
|
|
|
/datum/emote/living/nervous
|
|
key = "nervous"
|
|
key_shorthand = "ner"
|
|
message = "looks around nervously."
|
|
|
|
/datum/emote/living/nod
|
|
key = "nod"
|
|
key_third_person = "nods"
|
|
message = "nods."
|
|
message_mommi = "bobs its body in a rough approximation of nodding."
|
|
message_param = "nods at %t."
|
|
|
|
/datum/emote/living/point
|
|
key = "point"
|
|
key_third_person = "points"
|
|
message = "points."
|
|
message_param = "points at %t."
|
|
restraint_check = TRUE
|
|
|
|
/datum/emote/living/sigh
|
|
key = "sigh"
|
|
key_third_person = "sighs"
|
|
message = "sighs."
|
|
message_mime = "performs a silent theatrical sigh."
|
|
emote_type = EMOTE_AUDIBLE
|
|
|
|
/datum/emote/living/scoff
|
|
key = "scoff"
|
|
key_third_person = "scoffs"
|
|
key_shorthand = "sco"
|
|
message = "scoffs."
|
|
message_mime = "silently scoffs."
|
|
emote_type = EMOTE_AUDIBLE
|
|
|
|
/datum/emote/living/sit
|
|
key = "sit"
|
|
key_third_person = "sits"
|
|
message = "sits down."
|
|
|
|
/datum/emote/living/smile
|
|
key = "smile"
|
|
key_third_person = "smiles"
|
|
key_shorthand = "smi"
|
|
message = "smiles."
|
|
|
|
/datum/emote/living/squint
|
|
key = "squint"
|
|
key_third_person = "squints"
|
|
key_shorthand = "squ"
|
|
message = "squints."
|
|
|
|
/datum/emote/living/carbon/sneeze
|
|
key = "sneeze"
|
|
key_third_person = "sneezes"
|
|
key_shorthand = "sne"
|
|
message = "sneezes."
|
|
emote_type = EMOTE_AUDIBLE
|
|
|
|
/datum/emote/living/smug
|
|
key = "smug"
|
|
key_third_person = "smugs"
|
|
message = "grins smugly."
|
|
|
|
/datum/emote/living/stare
|
|
key = "stare"
|
|
key_third_person = "stares"
|
|
key_shorthand = "sta"
|
|
message = "stares."
|
|
message_param = "stares at %t."
|
|
|
|
/datum/emote/living/strech
|
|
key = "stretch"
|
|
key_third_person = "stretches"
|
|
key_shorthand = "str"
|
|
message = "stretches their arms."
|
|
|
|
/datum/emote/living/sulk
|
|
key = "sulk"
|
|
key_third_person = "sulks"
|
|
message = "sulks down sadly."
|
|
|
|
/datum/emote/living/surrender
|
|
key = "surrender"
|
|
key_third_person = "surrenders"
|
|
key_shorthand = "sur"
|
|
message = "puts their hands on their head and falls to the ground. They surrender%s!"
|
|
emote_type = EMOTE_AUDIBLE
|
|
|
|
/datum/emote/living/surrender/run_emote(mob/user, params)
|
|
. = ..()
|
|
if(. && isliving(user))
|
|
var/mob/living/L = user
|
|
L.Knockdown(10)
|
|
L.Stun(10)
|
|
|
|
/datum/emote/living/sway
|
|
key = "sway"
|
|
key_third_person = "sways"
|
|
message = "sways around dizzily."
|
|
|
|
/datum/emote/living/tremble
|
|
key = "tremble"
|
|
key_third_person = "trembles"
|
|
key_shorthand = "tre"
|
|
message = "trembles in fear!"
|
|
|
|
/datum/emote/living/custom
|
|
key = "custom"
|
|
message = null
|
|
|
|
mob_type_blacklist_typelist = list() // Everyone can custom emote.
|
|
|
|
/datum/emote/living/custom/proc/check_invalid(mob/user, input)
|
|
. = TRUE
|
|
if(copytext(input,1,5) == "says")
|
|
to_chat(user, "<span class='danger'>Invalid emote.</span>")
|
|
else if(copytext(input,1,9) == "exclaims")
|
|
to_chat(user, "<span class='danger'>Invalid emote.</span>")
|
|
else if(copytext(input,1,6) == "yells")
|
|
to_chat(user, "<span class='danger'>Invalid emote.</span>")
|
|
else if(copytext(input,1,5) == "asks")
|
|
to_chat(user, "<span class='danger'>Invalid emote.</span>")
|
|
else
|
|
. = FALSE
|
|
|
|
/datum/emote/living/custom/run_emote(mob/user, params, type_override = null)
|
|
if(jobban_isbanned(user, "emote"))
|
|
to_chat(user, "You cannot send custom emotes (banned).")
|
|
return FALSE
|
|
else if(user.client && user.client.prefs.muted & MUTE_IC)
|
|
to_chat(user, "You cannot send IC messages (muted).")
|
|
return FALSE
|
|
else if(!params)
|
|
var/custom_emote = copytext(sanitize(input("Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)
|
|
if(custom_emote && !check_invalid(user, custom_emote))
|
|
var/type = input("Is this a visible or hearable emote?") as null|anything in list("Visible", "Hearable")
|
|
switch(type)
|
|
if("Visible")
|
|
emote_type = EMOTE_VISIBLE
|
|
if("Hearable")
|
|
emote_type = EMOTE_AUDIBLE
|
|
else
|
|
alert("Unable to use this emote, must be either hearable or visible.")
|
|
return
|
|
message = custom_emote
|
|
else
|
|
message = params
|
|
if(type_override)
|
|
emote_type = type_override
|
|
. = ..()
|
|
message = null
|
|
emote_type = EMOTE_VISIBLE
|
|
|
|
/datum/emote/living/custom/replace_pronoun(mob/user, message)
|
|
return message
|
|
|
|
/datum/emote/living/help
|
|
key = "help"
|
|
|
|
/datum/emote/living/help/run_emote(mob/user, params)
|
|
var/list/keys = list()
|
|
var/list/message = list("Available emotes, you can use them with say \"*emote\": ")
|
|
|
|
var/datum/emote/E
|
|
|
|
for(var/e in emote_list)
|
|
E = emote_list[e]
|
|
if(E.key in keys)
|
|
continue
|
|
if(E.can_run_emote(user, status_check = FALSE))
|
|
keys += E.key
|
|
|
|
keys = sortList(keys)
|
|
|
|
for(var/emote in keys)
|
|
if(message.len > 1)
|
|
message += ", [emote]"
|
|
else
|
|
message += "[emote]"
|
|
|
|
message += "."
|
|
|
|
message = jointext(message, "")
|
|
|
|
to_chat(user, message)
|