Merge pull request #7067 from Citadel-Station-13/upstream-merge-38360

[MIRROR] Cleans up some logging
This commit is contained in:
LetterJay
2018-06-12 07:41:10 -05:00
committed by GitHub
48 changed files with 82 additions and 82 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ By design, d1 is the smallest direction and d2 is the highest
return
user.visible_message("[user] cuts the cable.", "<span class='notice'>You cut the cable.</span>")
stored.add_fingerprint(user)
investigate_log("was cut by [key_name(usr, usr.client)] in [AREACOORD(src)]", INVESTIGATE_WIRES)
investigate_log("was cut by [key_name(usr)] in [AREACOORD(src)]", INVESTIGATE_WIRES)
deconstruct()
return
+1 -1
View File
@@ -249,7 +249,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
if(href_list["gentoggle"])
breaker = !breaker
investigate_log("was toggled [breaker ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>"] by [usr.key].", INVESTIGATE_GRAVITY)
investigate_log("was toggled [breaker ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>"] by [key_name(usr)].", INVESTIGATE_GRAVITY)
set_power()
src.updateUsrDialog()
+1 -1
View File
@@ -80,7 +80,7 @@
if(loaded_tank)
fuel = loaded_tank.air_contents.gases[/datum/gas/plasma]
fuel = fuel ? fuel[MOLES] : 0
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"<font color='red'>It is empty</font>"].", INVESTIGATE_SINGULO)
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [key_name(user)]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"<font color='red'>It is empty</font>"].", INVESTIGATE_SINGULO)
return
else
to_chat(user, "<span class='warning'>The controls are locked!</span>")
@@ -78,7 +78,7 @@ field_generator power level display
"<span class='notice'>You turn on [src].</span>", \
"<span class='italics'>You hear heavy droning.</span>")
turn_on()
investigate_log("<font color='green'>activated</font> by [user.key].", INVESTIGATE_SINGULO)
investigate_log("<font color='green'>activated</font> by [key_name(user)].", INVESTIGATE_SINGULO)
add_fingerprint(user)
else
+7 -7
View File
@@ -348,12 +348,12 @@
switch(action)
if("tryinput")
input_attempt = !input_attempt
log_smes(usr.ckey)
log_smes(usr)
update_icon()
. = TRUE
if("tryoutput")
output_attempt = !output_attempt
log_smes(usr.ckey)
log_smes(usr)
update_icon()
. = TRUE
if("input")
@@ -377,7 +377,7 @@
. = TRUE
if(.)
input_level = CLAMP(target, 0, input_level_max)
log_smes(usr.ckey)
log_smes(usr)
if("output")
var/target = params["target"]
var/adjust = text2num(params["adjust"])
@@ -399,10 +399,10 @@
. = TRUE
if(.)
output_level = CLAMP(target, 0, output_level_max)
log_smes(usr.ckey)
log_smes(usr)
/obj/machinery/power/smes/proc/log_smes(user = "")
investigate_log("input/output; [input_level>output_level?"<font color='green'>":"<font color='red'>"][input_level]/[output_level]</font> | Charge: [charge] | Output-mode: [output_attempt?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [input_attempt?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [user]", INVESTIGATE_SINGULO)
/obj/machinery/power/smes/proc/log_smes(mob/user)
investigate_log("input/output; [input_level>output_level?"<font color='green'>":"<font color='red'>"][input_level]/[output_level]</font> | Charge: [charge] | Output-mode: [output_attempt?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [input_attempt?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [user ? key_name(user) : "outside forces"]", INVESTIGATE_SINGULO)
/obj/machinery/power/smes/emp_act(severity)
@@ -419,7 +419,7 @@
if (charge < 0)
charge = 0
update_icon()
log_smes("an emp")
log_smes()
/obj/machinery/power/smes/engineering
charge = 1.5e6 // Engineering starts with some charge for singulo
@@ -480,7 +480,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(!istype(L))
return FALSE
if(!istype(Proj.firer, /obj/machinery/power/emitter))
investigate_log("has been hit by [Proj] fired by [Proj.firer]", INVESTIGATE_SUPERMATTER)
investigate_log("has been hit by [Proj] fired by [key_name(Proj.firer)]", INVESTIGATE_SUPERMATTER)
if(Proj.flag != "bullet")
power += Proj.damage * config_bullet_energy
if(!has_been_powered)
@@ -563,7 +563,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(!cause)
cause = "contact"
nom.visible_message(vis_msg, mob_msg, "<span class='italics'>You hear an unearthly noise as a wave of heat washes over you.</span>")
investigate_log("has been attacked ([cause]) by [nom]", INVESTIGATE_SUPERMATTER)
investigate_log("has been attacked ([cause]) by [key_name(nom)]", INVESTIGATE_SUPERMATTER)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
Consume(nom)
@@ -582,7 +582,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
user.visible_message("<span class='danger'>As [user] touches \the [src] with \a [W], silence fills the room...</span>",\
"<span class='userdanger'>You touch \the [src] with \the [W], and everything suddenly goes silent.</span>\n<span class='notice'>\The [W] flashes into dust as you flinch away from \the [src].</span>",\
"<span class='italics'>Everything suddenly goes silent.</span>")
investigate_log("has been attacked ([W]) by [user]", INVESTIGATE_SUPERMATTER)
investigate_log("has been attacked ([W]) by [key_name(user)]", INVESTIGATE_SUPERMATTER)
Consume(W)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
@@ -629,7 +629,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//Some poor sod got eaten, go ahead and irradiate people nearby.
radiation_pulse(src, 3000, 2, TRUE)
for(var/mob/living/L in range(10))
investigate_log("has irradiated [L] after consuming [AM].", INVESTIGATE_SUPERMATTER)
investigate_log("has irradiated [key_name(L)] after consuming [AM].", INVESTIGATE_SUPERMATTER)
if(L in view())
L.show_message("<span class='danger'>As \the [src] slowly stops resonating, you find your skin covered in new radiation burns.</span>", 1,\
"<span class='danger'>The unearthly ringing subsides and you notice you have new radiation burns.</span>", 2)