Logging tweaks.

Uploading a new library book now also gives an admin notice.
Admin logs will now add a (JMP) if at all applicable.
This commit is contained in:
PsiOmegaDelta
2016-01-08 15:22:43 +01:00
parent ecd70a7cb9
commit 2c1debbcaa
6 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ var/const/NUCLEARBOMB_WIRE_SAFETY = 4
if(NUCLEARBOMB_WIRE_TIMING)
if(N.timing)
spawn
log_and_message_admins_with_location("pulsed a nuclear bomb's detonation wire, causing it to explode.", holder.x, holder.y, holder.z)
log_and_message_admins("pulsed a nuclear bomb's detonation wire, causing it to explode.")
N.explode()
if(NUCLEARBOMB_WIRE_SAFETY)
N.safety = !N.safety
@@ -49,7 +49,7 @@ var/const/NUCLEARBOMB_WIRE_SAFETY = 4
N.safety = mended
if(N.timing)
spawn
log_and_message_admins_with_location("cut a nuclear bomb's timing wire, causing it to explode.", holder.x, holder.y, holder.z)
log_and_message_admins("cut a nuclear bomb's timing wire, causing it to explode.")
N.explode()
if(NUCLEARBOMB_WIRE_TIMING)
N.secure_device()
+2 -2
View File
@@ -285,7 +285,7 @@ var/bomb_set
if (!timing && !safety)
timing = 1
log_and_message_admins_with_location("engaged a nuclear bomb", x, y, ,z)
log_and_message_admins("engaged a nuclear bomb")
bomb_set++ //There can still be issues with this resetting when there are multiple bombs. Not a big deal though for Nuke/N
update_icon()
else
@@ -413,7 +413,7 @@ if(!N.lighthack)
var/turf/T = pick_area_turf(/area/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects))
if(T)
var/obj/D = new /obj/item/weapon/disk/nuclear(T)
log_and_message_admins_with_location("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).", T.x, T.y, T.z)
log_and_message_admins("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).", location = T)
else
log_and_message_admins("[src], the last authentication disk, has been destroyed. Failed to respawn disc!")
return ..()
+4 -3
View File
@@ -2,10 +2,11 @@
/mob/var/lastattacked = null
/mob/var/attack_log = list()
proc/log_and_message_admins_with_location(var/message, var/x, var/y, var/z, var/mob/user = usr)
log_and_message_admins("[message] (<a HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", user)
proc/log_and_message_admins(var/message as text, var/mob/user = usr, var/turf/location)
var/turf/T = location ? location : (user ? get_turf(user) : null)
if(T)
message = message + " (<a HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)"
proc/log_and_message_admins(var/message as text, var/mob/user = usr)
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
message_admins(user ? "[key_name_admin(user)] [message]" : "EVENT [message]")
+1 -1
View File
@@ -13,7 +13,7 @@
kill()
return
log_and_message_admins_with_location("Event: Blob spawned at \the [get_area(T)] ([T.x],[T.y],[T.z])", T.x, T.y, T.z)
log_and_message_admins("Blob spawned at \the [get_area(T)]", location = T)
Blob = new /obj/effect/blob/core(T)
for(var/i = 1; i < rand(3, 4), i++)
Blob.process()
@@ -16,7 +16,7 @@
vine.mature_time = 0
vine.process()
log_and_message_admins_with_location("Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])", T.x, T.y, T.z)
log_and_message_admins("Spacevines spawned at \the [get_area(T)]", location = T)
return
log_and_message_admins("<span class='notice'>Event: Spacevines failed to find a viable turf.</span>")
+1
View File
@@ -353,6 +353,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
if(!query.Execute())
usr << query.ErrorMsg()
else
log_and_message_admins("has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
alert("Upload Complete.")