Soulcatcher chat logging, and subtle logging for free

Logs soulcatcher messages to the chat log so admins can review them, since that's kinda important, and gives subtle it's own logging format so you can tell it's a subtle and not just an emote. Also disables subtles while in the soulcatcher because apparently that was a thing.
This commit is contained in:
Arokha Sieyes
2017-06-10 14:55:36 -04:00
parent 4c3993df65
commit cd29b7de86
5 changed files with 63 additions and 20 deletions
@@ -26,7 +26,7 @@
return 1
var/nifmessage = sanitize(input("Type a message to say.","Speak into NIF") as text|null)
if(nifmessage)
SC.say_into(nifmessage,src.real_name)
SC.say_into(nifmessage,src)
return 1
if ("nme")
@@ -42,7 +42,7 @@
return 1
var/nifmessage = sanitize(input("Type an action to perform.","Emote into NIF") as text|null)
if(nifmessage)
SC.emote_into(nifmessage,src.real_name)
SC.emote_into(nifmessage,src)
return 1
if ("flip")
+1 -1
View File
@@ -41,7 +41,7 @@
return
if (message)
log_emote("[name]/[key] : [message]")
log_subtle("[name]/[key] : [message]")
var/list/vis = get_mobs_and_objs_in_view_fast(get_turf(src),1,2) //Turf, Range, and type 2 is emote
var/list/vis_mobs = vis["mobs"]
+48 -17
View File
@@ -64,17 +64,34 @@
inside_flavor = load
return TRUE
proc/say_into(var/message, var/sender)
to_chat(nif.human,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>[sender]</b> speaks, \"[message]\"")
for(var/brainmob in brainmobs)
var/mob/living/carbon/brain/caught_soul/CS = brainmob
to_chat(CS,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>[sender]</b> speaks, \"[message]\"")
proc/notify_into(var/message)
var/sound = nif.good_sound
to_chat(nif.human,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>Soulcatcher</b> displays, \"<span class='notice'>[message]</span>\"")
nif.human << sound
proc/emote_into(var/message, var/sender)
to_chat(nif.human,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>[sender]</b> [message]")
for(var/brainmob in brainmobs)
var/mob/living/carbon/brain/caught_soul/CS = brainmob
to_chat(CS,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>[sender]</b> [message]")
to_chat(CS,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>Soulcatcher</b> displays, \"<span class='notice'>[message]</span>\"")
brainmob << sound
proc/say_into(var/message, var/mob/living/sender)
var/sender_name = sender.name
log_nsay("[sender_name]/[sender.key] : [message]",nif.human)
to_chat(nif.human,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>[sender_name]</b> speaks, \"[message]\"")
for(var/brainmob in brainmobs)
var/mob/living/carbon/brain/caught_soul/CS = brainmob
to_chat(CS,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>[sender_name]</b> speaks, \"[message]\"")
proc/emote_into(var/message, var/mob/living/sender)
var/sender_name = sender.name
log_nme("[sender_name]/[sender.key] : [message]",nif.human)
to_chat(nif.human,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>[sender_name]</b> [message]")
for(var/brainmob in brainmobs)
var/mob/living/carbon/brain/caught_soul/CS = brainmob
to_chat(CS,"<b>\[\icon[nif.big_icon]NIF\]</b> <b>[sender_name]</b> [message]")
proc/show_settings(var/mob/living/carbon/human/H)
set waitfor = FALSE
@@ -121,13 +138,14 @@
proc/toggle_setting(var/flag)
setting_flags ^= flag
var/notify_message
//Special treatment
switch(flag)
if(NIF_SC_BACKUPS)
if(setting_flags & NIF_SC_BACKUPS)
emote_into(" - Mind backup system enabled.","SOULCATCHER")
notify_message = "Mind backup system enabled."
else
emote_into(" - Mind backup system disabled.","SOULCATCHER")
notify_message = "Mind backup system disabled."
if(NIF_SC_CATCHING_ME)
if(setting_flags & NIF_SC_CATCHING_ME)
@@ -144,23 +162,26 @@
for(var/brain in brainmobs)
var/mob/living/carbon/brain/caught_soul/brainmob = brain
brainmob.ext_deaf = FALSE
emote_into(" - External audio input enabled.","SOULCATCHER")
notify_message = "External audio input enabled."
else
for(var/brain in brainmobs)
var/mob/living/carbon/brain/caught_soul/brainmob = brain
brainmob.ext_deaf = TRUE
emote_into(" - External audio input disabled.","SOULCATCHER")
notify_message = "External audio input disabled."
if(NIF_SC_ALLOW_EYES)
if(setting_flags & NIF_SC_ALLOW_EYES)
for(var/brain in brainmobs)
var/mob/living/carbon/brain/caught_soul/brainmob = brain
brainmob.ext_blind = FALSE
emote_into(" - External video input enabled.","SOULCATCHER")
notify_message = "External video input enabled."
else
for(var/brain in brainmobs)
var/mob/living/carbon/brain/caught_soul/brainmob = brain
brainmob.ext_blind = TRUE
emote_into(" - External video input disabled.","SOULCATCHER")
notify_message = "External video input disabled."
if(notify_message)
notify_into(notify_message)
return TRUE
@@ -207,7 +228,7 @@
send messages that only they can hear/see by 'say'ing either '*nsay' or '*nme'.</span>")
//Announce to host and other minds
emote_into(" - New mind loaded: [brainmob.name]","SOULCATCHER")
notify_into("New mind loaded: [brainmob.name]")
return TRUE
////////////////
@@ -274,10 +295,20 @@
return FALSE
..()
/mob/living/carbon/brain/caught_soul/me_verb_subtle()
set hidden = TRUE
return FALSE
/mob/living/carbon/brain/caught_soul/whisper()
set hidden = TRUE
return FALSE
/mob/living/carbon/brain/caught_soul/say(var/message)
if(parent_mob) return ..()
if(silent) return FALSE
soulcatcher.say_into(message,src.name)
soulcatcher.say_into(message,src)
/mob/living/carbon/brain/caught_soul/emote(var/act,var/m_type=1,var/message = null)
if(parent_mob) return ..()
@@ -299,7 +330,7 @@
/mob/living/carbon/brain/caught_soul/custom_emote(var/m_type, var/message)
if(silent) return FALSE
soulcatcher.emote_into(message,src.name)
soulcatcher.emote_into(message,src)
/mob/living/carbon/brain/caught_soul/resist()
set name = "Resist"