Ghosts can *spin and *flip
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
return
|
||||
|
||||
log_talk(src,"Ghost/[src.key] : [message]", LOGSAY)
|
||||
<<<<<<< HEAD
|
||||
|
||||
. = src.say_dead(message)
|
||||
|
||||
@@ -23,3 +24,26 @@
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
to_chat(src, "[link] [message]")
|
||||
|
||||
=======
|
||||
|
||||
if(check_emote(message))
|
||||
return
|
||||
|
||||
. = say_dead(message)
|
||||
|
||||
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
var/atom/movable/to_follow = speaker
|
||||
if(radio_freq)
|
||||
var/atom/movable/virtualspeaker/V = speaker
|
||||
|
||||
if(isAI(V.source))
|
||||
var/mob/living/silicon/ai/S = V.source
|
||||
to_follow = S.eyeobj
|
||||
else
|
||||
to_follow = V.source
|
||||
var/link = FOLLOW_LINK(src, to_follow)
|
||||
// Recompose the message, because it's scrambled by default
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
to_chat(src, "[link] [message]")
|
||||
|
||||
>>>>>>> 887cc89... No flipping while unconscious (#33736)
|
||||
|
||||
48
code/modules/mob/emote.dm
Normal file
48
code/modules/mob/emote.dm
Normal file
@@ -0,0 +1,48 @@
|
||||
//The code execution of the emote datum is located at code/datums/emotes.dm
|
||||
/mob/emote(act, m_type = null, message = null)
|
||||
act = lowertext(act)
|
||||
var/param = message
|
||||
var/custom_param = findchar(act, " ")
|
||||
if(custom_param)
|
||||
param = copytext(act, custom_param + 1, length(act) + 1)
|
||||
act = copytext(act, 1, custom_param)
|
||||
|
||||
var/datum/emote/E
|
||||
E = E.emote_list[act]
|
||||
if(!E)
|
||||
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
|
||||
return
|
||||
E.run_emote(src, param, m_type)
|
||||
|
||||
/datum/emote/flip
|
||||
key = "flip"
|
||||
key_third_person = "flips"
|
||||
restraint_check = TRUE
|
||||
mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer)
|
||||
mob_type_ignore_stat_typecache = list(/mob/dead/observer)
|
||||
|
||||
/datum/emote/flip/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
user.SpinAnimation(7,1)
|
||||
|
||||
/datum/emote/spin
|
||||
key = "spin"
|
||||
key_third_person = "spins"
|
||||
restraint_check = TRUE
|
||||
mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer)
|
||||
mob_type_ignore_stat_typecache = list(/mob/dead/observer)
|
||||
|
||||
/datum/emote/spin/run_emote(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
user.spin(20, 1)
|
||||
|
||||
if(iscyborg(user) && user.has_buckled_mobs())
|
||||
var/mob/living/silicon/robot/R = user
|
||||
GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R)
|
||||
if(riding_datum)
|
||||
for(var/mob/M in R.buckled_mobs)
|
||||
riding_datum.force_dismount(M)
|
||||
else
|
||||
R.unbuckle_all_mobs()
|
||||
@@ -1,18 +1,3 @@
|
||||
//The code execution of the emote datum is located at code/datums/emotes.dm
|
||||
/mob/living/emote(act, m_type = null, message = null)
|
||||
act = lowertext(act)
|
||||
var/param = message
|
||||
var/custom_param = findchar(act, " ")
|
||||
if(custom_param)
|
||||
param = copytext(act, custom_param + 1, length(act) + 1)
|
||||
act = copytext(act, 1, custom_param)
|
||||
|
||||
var/datum/emote/E
|
||||
E = E.emote_list[act]
|
||||
if(!E)
|
||||
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
|
||||
return
|
||||
E.run_emote(src, param, m_type)
|
||||
|
||||
/* EMOTE DATUMS */
|
||||
/datum/emote/living
|
||||
@@ -143,16 +128,6 @@
|
||||
restraint_check = TRUE
|
||||
wing_time = 10
|
||||
|
||||
/datum/emote/living/flip
|
||||
key = "flip"
|
||||
key_third_person = "flips"
|
||||
restraint_check = TRUE
|
||||
|
||||
/datum/emote/living/flip/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
user.SpinAnimation(7,1)
|
||||
|
||||
/datum/emote/living/frown
|
||||
key = "frown"
|
||||
key_third_person = "frowns"
|
||||
@@ -482,25 +457,6 @@
|
||||
message_param = "beeps at %t."
|
||||
sound = 'sound/machines/twobeep.ogg'
|
||||
|
||||
/datum/emote/living/spin
|
||||
key = "spin"
|
||||
key_third_person = "spins"
|
||||
restraint_check = TRUE
|
||||
|
||||
/datum/emote/living/spin/run_emote(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
user.spin(20, 1)
|
||||
if(iscyborg(user) && user.has_buckled_mobs())
|
||||
var/mob/living/silicon/robot/R = user
|
||||
GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R)
|
||||
if(riding_datum)
|
||||
for(var/mob/M in R.buckled_mobs)
|
||||
riding_datum.force_dismount(M)
|
||||
else
|
||||
R.unbuckle_all_mobs()
|
||||
|
||||
|
||||
/datum/emote/living/circle
|
||||
key = "circle"
|
||||
key_third_person = "circles"
|
||||
|
||||
@@ -296,11 +296,6 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/check_emote(message)
|
||||
if(copytext(message, 1, 2) == "*")
|
||||
emote(copytext(message, 2))
|
||||
return 1
|
||||
|
||||
/mob/living/proc/get_message_mode(message)
|
||||
var/key = copytext(message, 1, 2)
|
||||
if(key == "#")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
//Speech verbs.
|
||||
/mob/verb/say_verb(message as text)
|
||||
set name = "Say"
|
||||
@@ -80,3 +81,93 @@
|
||||
|
||||
/mob/proc/lingcheck()
|
||||
return LINGHIVE_NONE
|
||||
=======
|
||||
//Speech verbs.
|
||||
/mob/verb/say_verb(message as text)
|
||||
set name = "Say"
|
||||
set category = "IC"
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
if(message)
|
||||
say(message)
|
||||
|
||||
|
||||
/mob/verb/whisper_verb(message as text)
|
||||
set name = "Whisper"
|
||||
set category = "IC"
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
whisper(message)
|
||||
|
||||
/mob/proc/whisper(message, datum/language/language=null)
|
||||
say(message, language) //only living mobs actually whisper, everything else just talks
|
||||
|
||||
/mob/verb/me_verb(message as text)
|
||||
set name = "Me"
|
||||
set category = "IC"
|
||||
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
usr.emote("me",1,message)
|
||||
|
||||
/mob/proc/say_dead(var/message)
|
||||
var/name = real_name
|
||||
var/alt_name = ""
|
||||
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
if(jobban_isbanned(src, "OOC"))
|
||||
to_chat(src, "<span class='danger'>You have been banned from deadchat.</span>")
|
||||
return
|
||||
|
||||
if (src.client)
|
||||
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<span class='danger'>You cannot talk in deadchat (muted).</span>")
|
||||
return
|
||||
|
||||
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
var/mob/dead/observer/O = src
|
||||
if(isobserver(src) && O.deadchat_name)
|
||||
name = "[O.deadchat_name]"
|
||||
else
|
||||
if(mind && mind.name)
|
||||
name = "[mind.name]"
|
||||
else
|
||||
name = real_name
|
||||
if(name != real_name)
|
||||
alt_name = " (died as [real_name])"
|
||||
|
||||
var/K
|
||||
|
||||
if(key)
|
||||
K = src.key
|
||||
|
||||
message = src.say_quote(message, get_spans())
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[message]</span></span>"
|
||||
|
||||
deadchat_broadcast(rendered, follow_target = src, speaker_key = K)
|
||||
|
||||
/mob/proc/check_emote(message)
|
||||
if(copytext(message, 1, 2) == "*")
|
||||
emote(copytext(message, 2))
|
||||
return 1
|
||||
|
||||
/mob/proc/emote(var/act)
|
||||
return
|
||||
|
||||
/mob/proc/hivecheck()
|
||||
return 0
|
||||
|
||||
/mob/proc/lingcheck()
|
||||
return LINGHIVE_NONE
|
||||
>>>>>>> 887cc89... No flipping while unconscious (#33736)
|
||||
|
||||
Reference in New Issue
Block a user