Allows admins to scan circuits + more logging (#38762)

* Allows admins to scan circuits

* Adds logging to screens that actually output to nearby

* incase they manually spam it

* Throw logs
This commit is contained in:
Dax Dupont
2018-06-28 21:18:07 +03:00
committed by vuonojenmustaturska
parent 964b748919
commit da9f93e20c
4 changed files with 16 additions and 2 deletions
@@ -69,7 +69,7 @@
else
to_chat(user, "<span class='notice'>The maintainence panel [opened ? "can be" : "is"] <b>screwed</b> in place.</span>")
if(isobserver(user) && ckeys_allowed_to_scan[user.ckey])
if((isobserver(user) && ckeys_allowed_to_scan[user.ckey]) || IsAdminGhost(user))
to_chat(user, "You can <a href='?src=[REF(src)];ghostscan=1'>scan</a> this circuit.");
/obj/item/electronic_assembly/proc/check_interactivity(mob/user)
@@ -192,7 +192,7 @@
return 1
if(href_list["ghostscan"])
if(isobserver(usr) && ckeys_allowed_to_scan[usr.ckey])
if((isobserver(usr) && ckeys_allowed_to_scan[usr.ckey]) || IsAdminGhost(usr))
if(assembly_components.len)
var/saved = "On circuit printers with cloning enabled, you may use the code below to clone the circuit:<br><br><code>[SScircuit.save_electronic_assembly(src)]</code>"
usr << browse(saved, "window=circuit_scan;size=500x600;border=1;can_resize=1;can_close=1;can_minimize=1")
@@ -209,6 +209,7 @@ D [1]/ ||
write_data_to_pin(new_data)
/datum/integrated_io/activate/ask_for_pin_data(mob/user) // This just pulses the pin.
holder.investigate_log(" was manually pulsed by [key_name(user)].", INVESTIGATE_CIRCUIT)
holder.check_then_do_work(ord,ignore_power = TRUE)
to_chat(user, "<span class='notice'>You pulse \the [holder]'s [src] pin.</span>")
@@ -527,6 +527,7 @@
var/range = round(CLAMP(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
assembly.visible_message("<span class='danger'>[assembly] has thrown [A]!</span>")
log_attack("[assembly] [REF(assembly)] has thrown [A].")
A.forceMove(drop_location())
A.throw_at(locate(x_abs, y_abs, T.z), range, 3)
@@ -46,6 +46,10 @@
for(var/mob/M in nearby_things)
var/obj/O = assembly ? assembly : src
to_chat(M, "<span class='notice'>[icon2html(O.icon, world, O.icon_state)] [stuff_to_display]</span>")
if(assembly)
assembly.investigate_log("displayed \"[html_encode(stuff_to_display)]\" with [type].", INVESTIGATE_CIRCUIT)
else
investigate_log("displayed \"[html_encode(stuff_to_display)]\" as [type].", INVESTIGATE_CIRCUIT)
/obj/item/integrated_circuit/output/screen/large
name = "large screen"
@@ -58,6 +62,10 @@
..()
var/obj/O = assembly ? get_turf(assembly) : loc
O.visible_message("<span class='notice'>[icon2html(O.icon, world, O.icon_state)] [stuff_to_display]</span>")
if(assembly)
assembly.investigate_log("displayed \"[html_encode(stuff_to_display)]\" with [type].", INVESTIGATE_CIRCUIT)
else
investigate_log("displayed \"[html_encode(stuff_to_display)]\" as [type].", INVESTIGATE_CIRCUIT)
/obj/item/integrated_circuit/output/light
name = "light"
@@ -153,6 +161,8 @@
playsound(get_turf(src), selected_sound, vol, freq, -1)
if(assembly)
assembly.investigate_log("played a sound ([selected_sound]) with [type].", INVESTIGATE_CIRCUIT)
else
investigate_log("played a sound ([selected_sound]) as [type].", INVESTIGATE_CIRCUIT)
/obj/item/integrated_circuit/output/sound/on_data_written()
power_draw_per_use = get_pin_data(IC_INPUT, 2) * 15
@@ -240,6 +250,8 @@
A.say(sanitized_text)
if (assembly)
log_say("[assembly] [REF(assembly)] : [sanitized_text]")
else
log_say("[name] ([type]) : [sanitized_text]")
/obj/item/integrated_circuit/output/video_camera
name = "video camera circuit"