mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-04 05:51:54 +00:00
* Refactor several log lines to use datum_info_line and atom_loc_line * Add default return strings from datum_info_line and atom_loc_line * Add parentheses around atom_loc_line data * Change more logs to use atom_loc_line * Add check in atom_loc_line for turfs to avoid calling get_turf on them * Re-add removed 'at' * Replace datum_info_line with key_name and atom_loc_line with loc_name * Refactor logging functions * Avoid double-logging self-interactions * Fallback to simple stringification if all else fails in key_name() * Rewrite muscle spasm logging to use log_message * Standardize logging of martial arts * Tweak individual logging panel look * Fix individual logging panel source * When I typed || I really meant && * Fix Telecomms logging always showing client logs in the panel * Reverts addition of buggy ownership log to panel * Remove colon * Fix missing log_directed_talk tag * Add warning for missing type in log_direted_talk * Change warnings to stack_traces * Add square brackets around fallthrough key_name() case to help parsing * Allow atom arguments/src in log_*() functions * Change log_combat call with null argument to log_message * Change mecha types' log_message() arguments to match atom and mob version * Add key_name() case for atoms * Fix resist_grab() unsetting pulledby before log_combat gets a chance to use it * Fix log_globally logic * Add logging for hitting objects with items * Move log_combat() to atoms.dm * Use utility functions for object stringification in log_combat() * Use utility functions for object stringification in log_combat() * Add missing logs for interacting with display cases * Rewrite log_combat() comment * Add missing space in log_combat() * Add logging for hitting grilles barehanded * Add missing ..()
102 lines
2.8 KiB
Plaintext
102 lines
2.8 KiB
Plaintext
//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,TRUE)
|
|
|
|
/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
|
|
|
|
var/jb = jobban_isbanned(src, "OOC")
|
|
if(QDELETED(src))
|
|
return
|
|
|
|
if(jb)
|
|
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
|
|
|
|
var/spanned = 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'>[emoji_parse(spanned)]</span></span>"
|
|
log_talk(message, LOG_SAY, tag="DEAD")
|
|
deadchat_broadcast(rendered, follow_target = src, speaker_key = K)
|
|
|
|
/mob/proc/check_emote(message)
|
|
if(copytext(message, 1, 2) == "*")
|
|
emote(copytext(message, 2), intentional = TRUE)
|
|
return 1
|
|
|
|
/mob/proc/hivecheck()
|
|
return 0
|
|
|
|
/mob/proc/lingcheck()
|
|
return LINGHIVE_NONE
|
|
|
|
/mob/proc/get_message_mode(message)
|
|
var/key = copytext(message, 1, 2)
|
|
if(key == "#")
|
|
return MODE_WHISPER
|
|
else if(key == ";")
|
|
return MODE_HEADSET
|
|
else if(length(message) > 2 && (key in GLOB.department_radio_prefixes))
|
|
var/key_symbol = lowertext(copytext(message, 2, 3))
|
|
return GLOB.department_radio_keys[key_symbol]
|