UDP Logging (#1997)

This implements UDP Logging with GELF.
It will allow full text search over all the logs and attributes sent over GELF to the log server.
This commit is contained in:
Werner
2017-04-01 23:47:00 +03:00
committed by skull132
parent a07a459f9e
commit 59e7377798
168 changed files with 602 additions and 414 deletions
+1 -1
View File
@@ -224,7 +224,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
resting = 1
var/turf/location = get_turf(src)
message_admins("[key_name_admin(usr)] has ghosted. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
log_game("[key_name_admin(usr)] has ghosted.")
log_game("[key_name_admin(usr)] has ghosted.",ckey=key_name(usr))
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
announce_ghost_joinleave(ghost)
+2 -2
View File
@@ -4,7 +4,7 @@
if (!message)
return
log_say("Ghost/[src.key] : [message]")
log_say("Ghost/[src.key] : [message]",ckey=key_name(src))
if (src.client)
if(src.client.prefs.muted & (MUTE_DEADCHAT|MUTE_IC))
@@ -23,7 +23,7 @@
if(act != "me")
return
log_emote("Ghost/[src.key] : [message]")
log_emote("Ghost/[src.key] : [message]",ckey=key_name(src))
if(src.client)
if(src.client.prefs.muted & (MUTE_DEADCHAT|MUTE_IC))
+4 -4
View File
@@ -1,7 +1,7 @@
// All mobs should have custom emote, really..
//m_type == 1 --> visual.
//m_type == 2 --> audible
/mob/proc/custom_emote(var/m_type=1,var/message = null)
/mob/proc/custom_emote(var/m_type=1,var/message = null, var/log_emote = 1)
if(usr && stat || !use_me && usr == src)
src << "You are unable to emote."
return
@@ -21,9 +21,9 @@
if (message)
log_emote("[name]/[key] : [message]")
send_emote(message, m_type)
if (log_emote)
log_emote("[name]/[key] : [message]",ckey=key_name(key))
/mob/proc/emote_dead(var/message)
@@ -49,7 +49,7 @@
input = message
if(input)
log_emote("Ghost/[src.key] : [input]")
log_emote("Ghost/[src.key] : [input]",ckey=key_name(src))
say_dead_direct(input, src)
+1 -1
View File
@@ -294,7 +294,7 @@ var/list/slot_equipment_priority = list( \
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
msg_admin_attack("[usr.name] ([usr.ckey]) has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
msg_admin_attack("[usr.name] ([usr.ckey]) has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)",ckey=key_name(usr),ckey_target=key_name(M))
if(!item) return //Grab processing has a chance of returning null
+1 -1
View File
@@ -98,7 +98,7 @@
return (copytext(message, length(message)) == "!") ? 2 : 1
/datum/language/proc/broadcast(var/mob/living/speaker,var/message,var/speaker_mask)
log_say("[key_name(speaker)] : ([name]) [message]")
log_say("[key_name(speaker)] : ([name]) [message]",ckey=key_name(speaker))
if(!speaker_mask) speaker_mask = speaker.name
message = format_message(message, get_spoken_verb(message))
+1 -1
View File
@@ -119,7 +119,7 @@
return new_name
/datum/language/bug/broadcast(var/mob/living/speaker,var/message,var/speaker_mask)
log_say("[key_name(speaker)] : ([name]) [message]")
log_say("[key_name(speaker)] : ([name]) [message]",ckey=key_name(speaker))
if(!speaker_mask)
speaker_mask = speaker.name
+1 -1
View File
@@ -17,7 +17,7 @@
if (!message)
return
log_say("[key_name(speaker)] : ([name]) [message]")
log_say("[key_name(speaker)] : ([name]) [message]",ckey=key_name(speaker))
var/message_start = "<i><span class='game say'>[name], <span class='name'>[speaker.name]</span>"
var/message_body = "<span class='message'>[speaker.say_quote(message)], \"[message]\"</span></span></i>"
@@ -116,6 +116,6 @@
else
src << text("Invalid Emote: []", act)
if ((message && src.stat == 0))
log_emote("[name]/[key] : [message]")
log_emote("[name]/[key] : [message]",ckey=key_name(key))
send_emote(message, m_type)
return
@@ -66,6 +66,6 @@
src << "\blue Unusable emote '[act]'. Say *help for a list."
if (message)
log_emote("[name]/[key] : [message]")
log_emote("[name]/[key] : [message]",ckey=key_name(key))
send_emote(message, m_type)
@@ -95,5 +95,5 @@
user.attack_log += "\[[time_stamp()]\]<font color='red'> Knifed [name] ([ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(W.damtype)])</font>"
src.attack_log += "\[[time_stamp()]\]<font color='orange'> Got knifed by [user.name] ([user.ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(W.damtype)])</font>"
msg_admin_attack("[key_name(user)] knifed [key_name(src)] with [W.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(W.damtype)])" )
msg_admin_attack("[key_name(user)] knifed [key_name(src)] with [W.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(W.damtype)])",ckey=key_name(user),ckey_target=key_name(src) )
return 1
@@ -256,7 +256,7 @@
mind.transfer_to(bestNymph)
bestNymph.stunned = 0//Switching mind seems to temporarily stun mobs
message_admins("\The [src] has split into nymphs; player now controls [key_name_admin(bestNymph)]")
log_admin("\The [src] has split into nymphs; player now controls [key_name(bestNymph)]")
log_admin("\The [src] has split into nymphs; player now controls [key_name(bestNymph)]", ckey=key_name(bestNymph))
//If bestNymph is still null at this point, it could only mean every nymph in the gestalt was a player
//In this unfathomably rare case, the gestalt player simply dies as its mob is qdel'd.
@@ -629,7 +629,7 @@ wink, yawn, swish, sway/wag, fastsway/qwag, stopsway/swag, beep, ping, buzz"}
if (message)
log_emote("[name]/[key] : [message]")
log_emote("[name]/[key] : [message]",ckey=key_name(src))
custom_emote(m_type,message)
@@ -904,7 +904,7 @@
else
target.show_message("\blue You hear a voice that seems to echo around the room: [say]")
usr.show_message("\blue You project your mind into [target.real_name]: [say]")
log_say("[key_name(usr)] sent a telepathic message to [key_name(target)]: [say]")
log_say("[key_name(usr)] sent a telepathic message to [key_name(target)]: [say]",ckey=key_name(usr))
for(var/mob/dead/observer/G in world)
G.show_message("<i>Telepathic message from <b>[src]</b> to <b>[target]</b>: [say]</i>")
@@ -42,7 +42,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
msg_admin_attack("[key_name_admin(M)] stungloved [src.name] ([src.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)")
msg_admin_attack("[key_name_admin(M)] stungloved [src.name] ([src.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)",ckey=key_name(M),ckey_target=key_name(src))
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
apply_effects(5,5,0,0,5,0,0,0,0,armorblock)
@@ -256,7 +256,7 @@
playsound(loc, ((miss_type) ? (miss_type == 1 ? attack.miss_sound : 'sound/weapons/thudswoosh.ogg') : attack.attack_sound), 25, 1, -1)
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[miss_type ? (miss_type == 1 ? "Missed" : "Blocked") : "[pick(attack.attack_verb)]"] [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>[miss_type ? (miss_type == 1 ? "Was missed by" : "Has blocked") : "Has Been [pick(attack.attack_verb)]"] by [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(H)] [miss_type ? (miss_type == 1 ? "has missed" : "was blocked by") : "has [pick(attack.attack_verb)]"] [key_name(src)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[H.x];Y=[H.y];Z=[H.z]'>JMP</a>)")
msg_admin_attack("[key_name(H)] [miss_type ? (miss_type == 1 ? "has missed" : "was blocked by") : "has [pick(attack.attack_verb)]"] [key_name(src)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[H.x];Y=[H.y];Z=[H.z]'>JMP</a>)",ckey=key_name(H),ckey_target=key_name(src))
if(miss_type)
return 0
@@ -284,7 +284,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
msg_admin_attack("[key_name(M)] disarmed [src.name] ([src.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)")
msg_admin_attack("[key_name(M)] disarmed [src.name] ([src.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)",ckey=key_name(M),ckey_target=key_name(src))
M.do_attack_animation(src)
if(w_uniform)
@@ -54,7 +54,7 @@ emp_act
c_hand = r_hand
if(c_hand && (stun_amount || agony_amount > 10))
msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)",ckey=key_name(src))
drop_from_inventory(c_hand)
if (affected.status & ORGAN_ROBOT)
@@ -337,7 +337,7 @@ emp_act
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [M.name] ([assailant.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with a thrown [O]</font>")
if(!istype(src,/mob/living/simple_animal/mouse))
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)",ckey=key_name(M),ckey_target=key_name(src))
//thrown weapon embedded object code.
if(dtype == BRUTE && istype(O,/obj/item))
@@ -185,7 +185,7 @@
src << "Not even a [src.species.name] can speak to the dead."
return
log_say("[key_name(src)] communed to [key_name(M)]: [text]")
log_say("[key_name(src)] communed to [key_name(M)]: [text]",ckey=key_name(src))
M << "\blue Like lead slabs crashing into the ocean, alien thoughts drop into your mind: [text]"
if(istype(M,/mob/living/carbon/human))
@@ -215,7 +215,7 @@
var/msg = sanitize(input("Message:", "Psychic Whisper") as text|null)
if(msg)
log_say("PsychicWhisper: [key_name(src)]->[M.key] : [msg]")
log_say("PsychicWhisper: [key_name(src)]->[M.key] : [msg]",ckey=key_name(src))
M << "\green You hear a strange, alien voice in your head... \italic [msg]"
src << "\green You said: \"[msg]\" to [M]"
return
@@ -249,13 +249,13 @@
if(istype(G.affecting,/mob/living/carbon/human))
var/mob/living/carbon/human/H = G.affecting
H.apply_damage(25,BRUTE, sharp=1, edge=1)
msg_admin_attack("[key_name_admin(src)] mandible'd [key_name_admin(H)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
msg_admin_attack("[key_name_admin(src)] mandible'd [key_name_admin(H)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)",ckey=key_name(src),ckey_target=key_name(H))
else
var/mob/living/M = G.affecting
if(!istype(M))
return
M.apply_damage(25,BRUTE, sharp=1, edge=1)
msg_admin_attack("[key_name_admin(src)] mandible'd [key_name_admin(M)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
msg_admin_attack("[key_name_admin(src)] mandible'd [key_name_admin(M)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)",ckey=key_name(src),ckey_target=key_name(M))
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1)
/mob/living/carbon/human/proc/detonate_flechettes()
@@ -423,7 +423,7 @@
src << "<span class='danger'>[M]'s hivenet implant is inactive!</span>"
return
log_say("[key_name(src)] issued a hivenet order to [key_name(M)]: [text]")
log_say("[key_name(src)] issued a hivenet order to [key_name(M)]: [text]",ckey=key_name(src))
if(istype(M, /mob/living/carbon/human) && isvaurca(M))
M << "<span class='danger'> You feel a buzzing in the back of your head, and your mind fills with the authority of [src.real_name], your ruler:</span>"
@@ -459,4 +459,4 @@
playsound(src.loc, 'sound/weapons/bladeslice.ogg', 50, 1)
var/obj/item/weapon/arrow/quill/A = new /obj/item/weapon/arrow/quill(usr.loc)
A.throw_at(target, 10, 30, user)
msg_admin_attack("[key_name_admin(src)] launched a quill at [key_name_admin(target)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
msg_admin_attack("[key_name_admin(src)] launched a quill at [key_name_admin(target)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)",ckey=key_name(src),ckey_target=key_name(target))
@@ -74,7 +74,7 @@
if(!message || message=="")
return
log_whisper("[key_name(src)] : ([get_lang_name(speaking)]) [message]")
log_whisper("[key_name(src)] : ([get_lang_name(speaking)]) [message]",ckey=key_name(src))
//looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems?
var/voice_sub
+1 -1
View File
@@ -766,7 +766,7 @@ default behaviour is:
return 0
message_admins("<span class='adminnotice'>[key_name_admin(possessor)] has taken control of \the [src].</span>")
log_admin("[key_name(possessor)] took control of \the [src].")
log_admin("[key_name(possessor)] took control of \the [src].",admin_key=key_name(possessor))
src.ckey = possessor.ckey
qdel(possessor)
+1 -1
View File
@@ -181,7 +181,7 @@
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [M.name] ([assailant.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with a thrown [O]</font>")
if(!istype(src,/mob/living/simple_animal/mouse))
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)",ckey=key_name(M),ckey_target=key_name(src))
// Begin BS12 momentum-transfer code.
var/mass = 1.5
+5 -5
View File
@@ -204,7 +204,7 @@ var/controlling
var/message = sanitize(input("Message:", "Thought") as text|null)
if(message)
log_say("MemeThought: [key_name(src)]->[M.key] : [message]")
log_say("MemeThought: [key_name(src)]->[M.key] : [message]",ckey=key_name(src))
M << "[message]"
src << "You said: \"[message]\" to [M]"
return
@@ -401,7 +401,7 @@ var/controlling
src.enter_host(target)
usr << "<b>You successfully jumped to [target].</b>"
log_admin("[src.key] has jumped to [target]")
log_admin("[src.key] has jumped to [target]",ckey=key_name(src))
message_admins("[src.key] has jumped to [target]")
// Jump to a distant target through a shout
@@ -440,7 +440,7 @@ var/controlling
src.enter_host(target)
usr << "<b>You successfully jumped to [target].</b>"
log_admin("[src.key] has jumped to [target]")
log_admin("[src.key] has jumped to [target]",ckey=key_name(src))
message_admins("[src.key] has jumped to [target]")
// Jump to an attuned mob for free
@@ -464,7 +464,7 @@ var/controlling
usr << "<b>You successfully jumped to [target].</b>"
log_admin("[src.key] has jumped to [target]")
log_admin("[src.key] has jumped to [target]",ckey=key_name(src))
message_admins("[src.key] has jumped to [target]")
// ATTUNE a mob, adding it to the indoctrinated list
@@ -485,7 +485,7 @@ var/controlling
usr << "<b>You successfully indoctrinated [host].</b>"
host << "\red Your head feels a bit roomier.."
log_admin("[src.key] has attuned [host]")
log_admin("[src.key] has attuned [host]",ckey=key_name(src))
message_admins("[src.key] has attuned [host]")
// Enables the mob to take a lot more damage
@@ -15,7 +15,7 @@
message = sanitize(message)
if (!message)
return
log_say("[key_name(src)] : [message]")
log_say("[key_name(src)] : [message]",ckey=key_name(src))
if (stat == 2)
return say_dead(message)
+2 -2
View File
@@ -275,11 +275,11 @@ proc/get_radio_key_from_channel(var/channel)
if(O) //It's possible that it could be deleted in the meantime.
O.hear_talk(src, message, verb, speaking)
log_say("[key_name(src)] : ([get_lang_name(speaking)]) [message]")
log_say("[key_name(src)] : ([get_lang_name(speaking)]) [message]",ckey=key_name(src))
return 1
/mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language)
log_say("[key_name(src)] : ([get_lang_name(language)]) [message]")
log_say("[key_name(src)] : ([get_lang_name(language)]) [message]",ckey=key_name(src))
for (var/mob/O in viewers(src, null))
O.hear_signlang(message, verb, language, src)
+1 -1
View File
@@ -423,7 +423,7 @@ var/list/ai_verbs_default = list(
return
Centcomm_announce(input, usr)
usr << "<span class='notice'>Message transmitted.</span>"
log_say("[key_name(usr)] has made an IA [boss_short] announcement: [input]")
log_say("[key_name(usr)] has made an IA [boss_short] announcement: [input]",ckey=key_name(usr))
emergency_message_cooldown = 1
spawn(300)
emergency_message_cooldown = 0
@@ -81,7 +81,7 @@ var/list/mob_hat_cache = list()
possessor << "<span class='warning'>\The [src] already has a player.</span>"
return 0
message_admins("<span class='adminnotice'>[key_name_admin(possessor)] has taken control of \the [src].</span>")
log_admin("[key_name(possessor)] took control of \the [src].")
log_admin("[key_name(possessor)] took control of \the [src].",ckey=key_name(possessor))
transfer_personality(possessor.client)
qdel(possessor)
return 1
@@ -232,7 +232,7 @@ var/list/mob_hat_cache = list()
src << "<span class='danger'>You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script.</span>"
message_admins("[key_name_admin(user)] emagged drone [key_name_admin(src)]. Laws overridden.")
log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.")
log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.",ckey=key_name(user),ckey_target=key_name(src))
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
@@ -89,7 +89,7 @@
if(D.stat != 2)
usr << "<span class='danger'>You issue a kill command for the unfortunate drone.</span>"
message_admins("[key_name_admin(usr)] issued kill order for drone [key_name_admin(D)] from control console.")
log_game("[key_name(usr)] issued kill order for [key_name(src)] from control console.")
log_game("[key_name(usr)] issued kill order for [key_name(src)] from control console.",ckey=key_name(usr),ckey_target=key_name(src))
D.shut_down()
else if (href_list["search_fab"])
@@ -1126,7 +1126,7 @@
disconnect_from_ai()
user << "You emag [src]'s interface."
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.",ckey=key_name(user),ckey_target=key_name(src))
clear_supplied_laws()
clear_inherent_laws()
laws = new /datum/ai_laws/syndicate_override
+3 -3
View File
@@ -2,7 +2,7 @@
return ..(sanitize ? sanitize(message) : message)
/mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
log_say("[key_name(src)] : [message]")
log_say("[key_name(src)] : [message]",ckey=key_name(src))
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
..()
@@ -61,7 +61,7 @@
//For holopads only. Usable by AI.
/mob/living/silicon/ai/proc/holopad_talk(var/message, verb, datum/language/speaking)
log_say("[key_name(src)] : [message]")
log_say("[key_name(src)] : [message]",ckey=key_name(src))
message = trim(message)
@@ -115,7 +115,7 @@
/mob/living/silicon/ai/proc/holopad_emote(var/message) //This is called when the AI uses the 'me' verb while using a holopad.
log_emote("[key_name(src)] : [message]")
log_emote("[key_name(src)] : [message]",ckey=key_name(src))
message = trim(message)
@@ -15,7 +15,7 @@
message = sanitize(message)
if (!message)
return
log_say("[key_name(src)] : [message]")
log_say("[key_name(src)] : [message]",ckey=key_name(src))
if (stat == 2)
return say_dead(message)
@@ -26,7 +26,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their soul captured with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(src),ckey_target=key_name(M))
transfer_soul("VICTIM", M, user)
return
@@ -76,7 +76,7 @@
visible += O
if(visible.len)
var/atom/A = pick(visible)
visible_emote("suddenly stops and stares at something unseen[istype(A) ? " near [A]":""].")
visible_emote("suddenly stops and stares at something unseen[istype(A) ? " near [A]":""].",0)
/mob/living/simple_animal/cat/proc/handle_movement_target()
//if our target is neither inside a turf or inside a human(???), stop
@@ -98,14 +98,14 @@
for(var/mob/living/simple_animal/mouse/M in oview(src,1))
if(M.stat != DEAD)
M.splat()
visible_emote(pick("bites \the [M]!","toys with \the [M].","chomps on \the [M]!"))
visible_emote(pick("bites \the [M]!","toys with \the [M].","chomps on \the [M]!"),0)
movement_target = null
stop_automated_movement = 0
if (prob(75))
break//usually only kill one mouse per proc
/mob/living/simple_animal/cat/beg(var/atom/thing, var/atom/holder)
visible_emote("licks [get_pronoun(POSESSIVE_ADJECTIVE)] lips and hungrily glares at [holder]'s [thing.name]")
visible_emote("licks [get_pronoun(POSESSIVE_ADJECTIVE)] lips and hungrily glares at [holder]'s [thing.name]",0)
/mob/living/simple_animal/cat/Released()
//A thrown cat will immediately attack mice near where it lands
@@ -209,7 +209,7 @@
visible_emote(pick("nuzzles [friend].",
"brushes against [friend].",
"rubs against [friend].",
"purrs."))
"purrs."),0)
else if (friend.health <= 50)
if (prob(10))
var/verb = pick("meows", "mews", "mrowls")
@@ -48,7 +48,7 @@
if(!stat && !resting && !buckled)
if(prob(1))
visible_emote(pick("dances around","chases their tail"))
visible_emote(pick("dances around","chases their tail"),0)
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
set_dir(i)
@@ -57,7 +57,7 @@
/mob/living/simple_animal/corgi/beg(var/atom/thing, var/atom/holder)
visible_emote("stares at the [thing] that [holder] has with sad puppy eyes.")
visible_emote("stares at the [thing] that [holder] has with sad puppy eyes.",0)
@@ -169,7 +169,7 @@
if(prob(1))
visible_emote(pick("dances around","chases her tail"))
visible_emote(pick("dances around","chases her tail"),0)
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
set_dir(i)
@@ -31,7 +31,7 @@
..()
/mob/living/simple_animal/hostile/retaliate/goat/beg(var/atom/thing, var/atom/holder)
visible_emote("butts insistently at [holder]'s legs and reaches towards their [thing].")
visible_emote("butts insistently at [holder]'s legs and reaches towards their [thing].",0)
/mob/living/simple_animal/hostile/retaliate/goat/Life()
. = ..()
@@ -125,7 +125,7 @@
/mob/living/simple_animal/mouse/beg(var/atom/thing, var/atom/holder)
squeak_soft(0)
visible_emote("squeaks timidly, sniffs the air and gazes longingly up at \the [thing.name].")
visible_emote("squeaks timidly, sniffs the air and gazes longingly up at \the [thing.name].",0)
/mob/living/simple_animal/mouse/attack_hand(mob/living/carbon/human/M as mob)
if (src.stat == DEAD)//If the mouse is dead, we don't pet it, we just pickup the corpse on click
@@ -150,7 +150,7 @@
if (stat == CONSCIOUS)
playsound(src, 'sound/effects/mousesqueek.ogg', 70, 1)
if (manual)
log_say("[key_name(src)] squeaks! ")
log_say("[key_name(src)] squeaks! ",ckey=key_name(src))
@@ -165,7 +165,7 @@
playsound(src, sound, 5, 1, -4.6)
if (manual)
log_say("[key_name(src)] squeaks softly! ")
log_say("[key_name(src)] squeaks softly! ",ckey=key_name(src))
//Plays a loud sound
@@ -175,7 +175,7 @@
if (squeals > 0 || !manual)
playsound(src, 'sound/effects/creatures/mouse_squeak_loud.ogg', 50, 1)
squeals --
log_say("[key_name(src)] squeals! ")
log_say("[key_name(src)] squeals! ",ckey=key_name(src))
else
src << "\red Your hoarse mousey throat can't squeal just now, stop and take a breath!"
@@ -339,7 +339,7 @@
//Search for item to steal
parrot_interest = search_for_item()
if(parrot_interest)
visible_emote("looks in [parrot_interest]'s direction and takes flight")
visible_emote("looks in [parrot_interest]'s direction and takes flight",0)
parrot_state = PARROT_SWOOP | PARROT_STEAL
icon_state = "parrot_fly"
return
@@ -361,7 +361,7 @@
if(AM)
if(istype(AM, /obj/item) || isliving(AM)) //If stealable item
parrot_interest = AM
visible_emote("turns and flies towards [parrot_interest]")
visible_emote("turns and flies towards [parrot_interest]",0)
parrot_state = PARROT_SWOOP | PARROT_STEAL
return
else //Else it's a perch
@@ -101,7 +101,7 @@
var/icon_rest = null
/mob/living/simple_animal/proc/beg(var/atom/thing, var/atom/holder)
visible_emote("gazes longingly at [holder]'s [thing]")
visible_emote("gazes longingly at [holder]'s [thing]",0)
/mob/living/simple_animal/New()
..()
@@ -206,23 +206,23 @@
else
randomValue -= speak.len
if(emote_see && randomValue <= emote_see.len)
visible_emote("[pick(emote_see)].")
visible_emote("[pick(emote_see)].",0)
else
audible_emote("[pick(emote_hear)].")
audible_emote("[pick(emote_hear)].",0)
else
say(pick(speak))
else
if(!(emote_hear && emote_hear.len) && (emote_see && emote_see.len))
visible_emote("[pick(emote_see)].")
visible_emote("[pick(emote_see)].",0)
if((emote_hear && emote_hear.len) && !(emote_see && emote_see.len))
audible_emote("[pick(emote_hear)].")
audible_emote("[pick(emote_hear)].",0)
if((emote_hear && emote_hear.len) && (emote_see && emote_see.len))
var/length = emote_hear.len + emote_see.len
var/pick = rand(1,length)
if(pick <= emote_see.len)
visible_emote("[pick(emote_see)].")
visible_emote("[pick(emote_see)].",0)
else
audible_emote("[pick(emote_hear)].")
audible_emote("[pick(emote_hear)].",0)
speak_audio()
if (can_nap)
@@ -345,8 +345,8 @@
/mob/living/simple_animal/proc/speak_audio()
return
/mob/living/simple_animal/proc/visible_emote(var/act_desc)
custom_emote(1, act_desc)
/mob/living/simple_animal/proc/visible_emote(var/act_desc, var/log_emote=1)
custom_emote(1, act_desc, log_emote)
/mob/living/simple_animal/proc/audible_emote(var/act_desc)
custom_emote(2, act_desc)
+3 -3
View File
@@ -3,7 +3,7 @@
//Multikey checks and logging
lastKnownIP = client.address
computer_id = client.computer_id
log_access("Login: [key_name(src)] from [lastKnownIP ? lastKnownIP : "localhost"]-[computer_id] || BYOND v[client.byond_version]")
log_access("Login: [key_name(src)] from [lastKnownIP ? lastKnownIP : "localhost"]-[computer_id] || BYOND v[client.byond_version]",ckey=key_name(src))
if(config.log_access)
for(var/mob/M in player_list)
if(M == src) continue
@@ -18,10 +18,10 @@
if(matches)
if(M.client)
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'><A href='?src=\ref[usr];priv_msg=\ref[src]'>[key_name_admin(src)]</A> has the same [matches] as <A href='?src=\ref[usr];priv_msg=\ref[M]'>[key_name_admin(M)]</A>.</font>", 1)
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)].")
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)].",ckey=key_name(src))
else
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'><A href='?src=\ref[usr];priv_msg=\ref[src]'>[key_name_admin(src)]</A> has the same [matches] as [key_name_admin(M)] (no longer logged in). </font>", 1)
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).")
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).",ckey=key_name(src))
/mob/Login()
+1 -1
View File
@@ -1,7 +1,7 @@
/mob/Logout()
nanomanager.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
player_list -= src
log_access("Logout: [key_name(src)]")
log_access("Logout: [key_name(src)]",ckey=key_name(src))
if(admin_datums[src.ckey])
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
var/admins_number = 0
+6 -6
View File
@@ -454,23 +454,23 @@
usr << "You can respawn now, enjoy your new life!"
log_game("[usr.name]/[usr.key] used abandon mob.")
log_game("[usr.name]/[usr.key] used abandon mob.",ckey=key_name(usr))
usr << "<span class='notice'><B>Make sure to play a different character, and please roleplay correctly!</B></span>"
if(!client)
log_game("[usr.key] AM failed due to disconnect.")
log_game("[usr.key] AM failed due to disconnect.",ckey=key_name(usr))
return
client.screen.Cut()
if(!client)
log_game("[usr.key] AM failed due to disconnect.")
log_game("[usr.key] AM failed due to disconnect.",ckey=key_name(usr))
return
announce_ghost_joinleave(client, 0)
var/mob/new_player/M = new /mob/new_player()
if(!client)
log_game("[usr.key] AM failed due to disconnect.")
log_game("[usr.key] AM failed due to disconnect.",ckey=key_name(usr))
qdel(M)
return
@@ -1210,7 +1210,7 @@ mob/proc/yank_out_object()
SetWeakened(200)
visible_message("<font color='#002eb8'><b>OOC Information:</b></font> <font color='red'>[src] has been winded by a member of staff! Please freeze all roleplay involving their character until the matter is resolved! Adminhelp if you have further questions.</font>", "<font color='red'><b>You have been winded by a member of staff! Please stand by until they contact you!</b></font>")
log_admin("[key_name(admin)] winded [key_name(src)]!")
log_admin("[key_name(admin)] winded [key_name(src)]!",admin_key=key_name(admin),ckey=key_name(src))
message_admins("[key_name_admin(admin)] winded [key_name_admin(src)]!", 1)
feedback_add_details("admin_verb", "WIND")
@@ -1226,7 +1226,7 @@ mob/proc/yank_out_object()
SetWeakened(0)
visible_message("<font color='#002eb8'><b>OOC Information:</b></font> <font color='green'>[src] has been unwinded by a member of staff!</font>", "<font color='red'><b>You have been unwinded by a member of staff!</b></font>")
log_admin("[key_name(admin)] unwinded [key_name(src)]!")
log_admin("[key_name(admin)] unwinded [key_name(src)]!",admin_key=key_name(admin),ckey=key_name(src))
message_admins("[key_name_admin(admin)] unwinded [key_name_admin(src)]!", 1)
feedback_add_details("admin_verb", "UNWIND")
+2 -2
View File
@@ -262,7 +262,7 @@
assailant.set_dir(get_dir(assailant, affecting))
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] grabbed the neck of [key_name(affecting)]")
msg_admin_attack("[key_name(assailant)] grabbed the neck of [key_name(affecting)]",ckey=key_name(assailant),ckey_target=key_name(affecting))
hud.icon_state = "kill"
hud.name = "kill"
affecting.Stun(10) //10 ticks of ensured grab
@@ -274,7 +274,7 @@
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]",ckey=key_name(assailant),ckey_target=key_name(affecting))
affecting.setClickCooldown(10)
affecting.losebreath += 1
+2 -2
View File
@@ -77,7 +77,7 @@
attacker.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [target.name]'s eyes using grab ([target.ckey])</font>")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had eyes attacked by [attacker.name]'s grab ([attacker.ckey])</font>")
msg_admin_attack("[key_name(attacker)] attacked [key_name(target)]'s eyes using a grab action.")
msg_admin_attack("[key_name(attacker)] attacked [key_name(target)]'s eyes using a grab action.",ckey=key_name(attacker),ckey_target=key_name(target))
attack.handle_eye_attack(attacker, target)
@@ -104,7 +104,7 @@
playsound(attacker.loc, "swing_hit", 25, 1, -1)
attacker.attack_log += text("\[[time_stamp()]\] <font color='red'>Headbutted [target.name] ([target.ckey])</font>")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Headbutted by [attacker.name] ([attacker.ckey])</font>")
msg_admin_attack("[key_name(attacker)] has headbutted [key_name(target)]")
msg_admin_attack("[key_name(attacker)] has headbutted [key_name(target)]",ckey=key_name(attacker),ckey_target=key_name(target))
attacker.drop_from_inventory(src)
src.loc = null