mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Finishes brain emotes
Fixes simple animal attacks(when no damage) Re-adds sounds to some alien emotes.
This commit is contained in:
@@ -1,71 +1,34 @@
|
||||
/mob/living/brain/emote(act,m_type=1,message = null)
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))//No MMI, no emotes
|
||||
return
|
||||
/datum/emote/brain
|
||||
mob_type_allowed_typecache = list(/mob/living/brain)
|
||||
mob_type_blacklist_typecache = list()
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
act = copytext(act, 1, t1)
|
||||
/datum/emote/brain/can_run_emote(mob/user)
|
||||
. = ..()
|
||||
var/mob/living/brain/B = user
|
||||
if(!(B.container && istype(B.container, /obj/item/device/mmi)))
|
||||
return FALSE
|
||||
|
||||
/datum/emote/brain/alarm
|
||||
key = "alarm"
|
||||
message = "sounds an alarm."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
if(src.stat == DEAD)
|
||||
return
|
||||
switch(act)
|
||||
if ("alarm")
|
||||
src << "You sound an alarm."
|
||||
message = "<B>[src]</B> sounds an alarm."
|
||||
m_type = 2
|
||||
/datum/emote/brain/alert
|
||||
key = "alert"
|
||||
message = "lets out a distressed noise."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
if ("alert")
|
||||
src << "You let out a distressed noise."
|
||||
message = "<B>[src]</B> lets out a distressed noise."
|
||||
m_type = 2
|
||||
/datum/emote/brain/flash
|
||||
key = "flash"
|
||||
message = "lights' blink."
|
||||
|
||||
if ("beep","beeps")
|
||||
src << "You beep."
|
||||
message = "<B>[src]</B> beeps."
|
||||
m_type = 2
|
||||
/datum/emote/brain/notice
|
||||
key = "notice"
|
||||
message = "plays a loud tone."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
if ("blink","blinks")
|
||||
message = "<B>[src]</B> blinks."
|
||||
m_type = 1
|
||||
|
||||
if ("boop","boops")
|
||||
src << "You boop."
|
||||
message = "<B>[src]</B> boops."
|
||||
m_type = 2
|
||||
|
||||
if ("flash")
|
||||
message = "The lights on <B>[src]</B> flash quickly."
|
||||
m_type = 1
|
||||
|
||||
if ("notice")
|
||||
src << "You play a loud tone."
|
||||
message = "<B>[src]</B> plays a loud tone."
|
||||
m_type = 2
|
||||
|
||||
if ("whistle","whistles")
|
||||
src << "You whistle."
|
||||
message = "<B>[src]</B> whistles."
|
||||
m_type = 2
|
||||
|
||||
if ("help")
|
||||
src << "Help for MMI emotes. You can use these emotes with say \"*emote\":\nalarm, alert, beep, blink, boop, flash, notice, whistle"
|
||||
|
||||
else
|
||||
src << "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>"
|
||||
return
|
||||
|
||||
if (message)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if (!M.client || isnewplayer(M))
|
||||
continue //skip monkeys, leavers, and new_players
|
||||
if(M.stat == DEAD && (M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT)) && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
if (m_type & 1)
|
||||
visible_message(message)
|
||||
else if (m_type & 2)
|
||||
audible_message(message)
|
||||
/datum/emote/brain/whistle
|
||||
key = "whistle"
|
||||
key_third_person = "whistles"
|
||||
message = "whistles."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
Reference in New Issue
Block a user