mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Dedicated wire logging file (#11125)
This commit is contained in:
@@ -3,6 +3,16 @@
|
||||
holder_type = /obj/machinery/alarm
|
||||
wire_count = 5
|
||||
|
||||
/datum/wires/alarm/New()
|
||||
wire_names=list(
|
||||
"[AALARM_WIRE_IDSCAN]" = "ID scan",
|
||||
"[AALARM_WIRE_POWER]" = "Power",
|
||||
"[AALARM_WIRE_SYPHON]" = "Syphon",
|
||||
"[AALARM_WIRE_AI_CONTROL]" = "AI Control",
|
||||
"[AALARM_WIRE_AALARM]" = "Alarm"
|
||||
)
|
||||
..()
|
||||
|
||||
var/const/AALARM_WIRE_IDSCAN = 1
|
||||
var/const/AALARM_WIRE_POWER = 2
|
||||
var/const/AALARM_WIRE_SYPHON = 4
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
holder_type = /obj/machinery/power/apc
|
||||
wire_count = 4
|
||||
|
||||
/datum/wires/apc/New()
|
||||
wire_names=list(
|
||||
"[APC_WIRE_IDSCAN]" = "ID scan",
|
||||
"[APC_WIRE_MAIN_POWER1]" = "Power 1",
|
||||
"[APC_WIRE_MAIN_POWER2]" = "Power 2",
|
||||
"[APC_WIRE_AI_CONTROL]" = "AI Control"
|
||||
)
|
||||
..()
|
||||
|
||||
var/const/APC_WIRE_IDSCAN = 1
|
||||
var/const/APC_WIRE_MAIN_POWER1 = 2
|
||||
var/const/APC_WIRE_MAIN_POWER2 = 4
|
||||
|
||||
@@ -5,6 +5,17 @@
|
||||
holder_type = /obj/machinery/camera
|
||||
wire_count = 6
|
||||
|
||||
/datum/wires/camera/New()
|
||||
wire_names=list(
|
||||
"[CAMERA_WIRE_FOCUS]" = "Focus",
|
||||
"[CAMERA_WIRE_POWER]" = "Power",
|
||||
"[CAMERA_WIRE_LIGHT]" = "Camera Lights",
|
||||
"[CAMERA_WIRE_ALARM]" = "Alarm",
|
||||
"[CAMERA_WIRE_NOTHING1]" = "Nothing 1",
|
||||
"[CAMERA_WIRE_NOTHING2]" = "Nothing 2"
|
||||
)
|
||||
..()
|
||||
|
||||
/datum/wires/camera/GetInteractWindow()
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -14,6 +14,17 @@
|
||||
freq_config_data[JUKE_POWER_TWO] = rand(1,14)
|
||||
freq_config_data[JUKE_POWER_THREE] = rand(1,14)
|
||||
|
||||
wire_names=list(
|
||||
"[JUKE_POWER_ONE]" = "Power 1",
|
||||
"[JUKE_POWER_TWO]" = "Power 2",
|
||||
"[JUKE_POWER_THREE]" = "Power 3",
|
||||
"[JUKE_SHUFFLE]" = "Shuffle",
|
||||
"[JUKE_CAPITAL]" = "Capital",
|
||||
"[JUKE_TRANSMIT]" = "Transmit",
|
||||
"[JUKE_CONFIG]" = "Config",
|
||||
"[JUKE_SETTING]" = "Settings"
|
||||
)
|
||||
|
||||
var/const/JUKE_POWER_ONE = 1 //Power. Cut for shock and off. Pulse toggles.
|
||||
var/const/JUKE_POWER_TWO = 2 //Power. Cut for shock and off. Pulse toggles.
|
||||
var/const/JUKE_POWER_THREE = 4 //Power. Cut for shock and off. Pulse toggles.
|
||||
|
||||
@@ -3,6 +3,20 @@
|
||||
holder_type = /obj/machinery/bot/mulebot
|
||||
wire_count = 10
|
||||
|
||||
/datum/wires/mulebot/New()
|
||||
wire_names=list(
|
||||
"[WIRE_POWER1]" = "Power 1",
|
||||
"[WIRE_POWER2]" = "Power 2",
|
||||
"[WIRE_AVOIDANCE]" = "Avoidance",
|
||||
"[WIRE_LOADCHECK]" = "Load Check",
|
||||
"[WIRE_MOTOR1]" = "Motor 1",
|
||||
"[WIRE_MOTOR2]" = "Motor 2",
|
||||
"[WIRE_REMOTE_RX]" = "Remote RX",
|
||||
"[WIRE_REMOTE_TX]" = "Remote TX",
|
||||
"[WIRE_BEACON_RX]" = "Beacon RX"
|
||||
)
|
||||
..()
|
||||
|
||||
var/const/WIRE_POWER1 = 1 // power connections
|
||||
var/const/WIRE_POWER2 = 2
|
||||
var/const/WIRE_AVOIDANCE = 4 // mob avoidance
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
wire_count = 5
|
||||
holder_type = /obj/machinery/particle_accelerator/control_box
|
||||
|
||||
/datum/wires/particle_acc/control_box/New()
|
||||
wire_names=list(
|
||||
"[PARTICLE_TOGGLE_WIRE]" = "Toggle",
|
||||
"[PARTICLE_STRENGTH_WIRE]" = "Strength",
|
||||
"[PARTICLE_INTERFACE_WIRE]" = "Interface",
|
||||
"[PARTICLE_LIMIT_POWER_WIRE]" = "Power Limit"
|
||||
)
|
||||
..()
|
||||
|
||||
var/const/PARTICLE_TOGGLE_WIRE = 1 // Toggles whether the PA is on or not.
|
||||
var/const/PARTICLE_STRENGTH_WIRE = 2 // Determines the strength of the PA.
|
||||
var/const/PARTICLE_INTERFACE_WIRE = 4 // Determines the interface showing up.
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
holder_type = /obj/item/device/radio
|
||||
wire_count = 3
|
||||
|
||||
/datum/wires/radio/New()
|
||||
wire_names=list(
|
||||
"[WIRE_SIGNAL]" = "Signal",
|
||||
"[WIRE_RECEIVE]" = "Receive",
|
||||
"[WIRE_TRANSMIT]" = "Transmit"
|
||||
)
|
||||
..()
|
||||
|
||||
var/const/WIRE_SIGNAL = 1
|
||||
var/const/WIRE_RECEIVE = 2
|
||||
var/const/WIRE_TRANSMIT = 4
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
holder_type = /obj/machinery/r_n_d
|
||||
wire_count = 5
|
||||
|
||||
/datum/wires/rnd/New()
|
||||
wire_names=list(
|
||||
"[RND_WIRE_DISABLE]" = "Disable",
|
||||
"[RND_WIRE_SHOCK]" = "Shock",
|
||||
"[RND_WIRE_HACK]" = "Hack"
|
||||
)
|
||||
..()
|
||||
|
||||
var/const/RND_WIRE_DISABLE = 1
|
||||
var/const/RND_WIRE_SHOCK = 2
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
holder_type = /mob/living/silicon/robot
|
||||
wire_count = 5
|
||||
|
||||
/datum/wires/robot/New()
|
||||
wire_names=list(
|
||||
"[BORG_WIRE_MAIN_POWER]" = "Power",
|
||||
"[BORG_WIRE_LOCKED_DOWN]" = "Lockdown",
|
||||
"[BORG_WIRE_CAMERA]" = "Camera",
|
||||
"[BORG_WIRE_AI_CONTROL]" = "AI Control",
|
||||
"[BORG_WIRE_LAWCHECK]" = "LawSync"
|
||||
)
|
||||
..()
|
||||
|
||||
/* /tg/ ordering doesn't work for us, we need lawsync at the end for MoMMIs.
|
||||
var/const/BORG_WIRE_LAWCHECK = 1
|
||||
var/const/BORG_WIRE_MAIN_POWER = 2 // The power wires do nothing whyyyyyyyyyyyyy
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
wire_count = 5
|
||||
var/counter = null
|
||||
|
||||
/datum/wires/transmitter/New()
|
||||
wire_names=list(
|
||||
"[TRANS_POWER]" = "Power",
|
||||
"[TRANS_RAD_ONE]" = "Rad 1",
|
||||
"[TRANS_RAD_TWO]" = "Rad 2",
|
||||
"[TRANS_LINK]" = "Link",
|
||||
"[TRANS_SETTINGS]" = "Settings"
|
||||
)
|
||||
..()
|
||||
|
||||
var/const/TRANS_POWER = 1 //Power. Cut for shock and off. Pulse toggles.
|
||||
var/const/TRANS_RAD_ONE = 2 //Reduces rad output by 50%. Requires at least one to function. Pulse does nothing.
|
||||
var/const/TRANS_RAD_TWO = 4 //Reduces rad output by 50%. Requires at least one to function. Pulse does nothing.
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
holder_type = /obj/machinery/vending
|
||||
wire_count = 4
|
||||
|
||||
/datum/wires/vending/New()
|
||||
wire_names=list(
|
||||
"[VENDING_WIRE_THROW]" = "Firing",
|
||||
"[VENDING_WIRE_CONTRABAND]" = "Contraband",
|
||||
"[VENDING_WIRE_ELECTRIFY]" = "Shock",
|
||||
"[VENDING_WIRE_IDSCAN]" = "ID Scan"
|
||||
)
|
||||
..()
|
||||
|
||||
var/const/VENDING_WIRE_THROW = 1
|
||||
var/const/VENDING_WIRE_CONTRABAND = 2
|
||||
var/const/VENDING_WIRE_ELECTRIFY = 4
|
||||
|
||||
@@ -86,7 +86,8 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
popup.open()
|
||||
|
||||
/datum/wires/proc/GetWireName(var/i)
|
||||
return wire_names["[i]"]
|
||||
if(wire_names.len)
|
||||
return wire_names["[i]"]
|
||||
|
||||
/datum/wires/proc/GetInteractWindow()
|
||||
var/html = "<div class='block'>"
|
||||
@@ -120,7 +121,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
if(iswirecutter(I))
|
||||
var/colour = href_list["cut"]
|
||||
CutWireColour(colour)
|
||||
log_attack("[key_name(usr)] has [IsColourCut(colour) ? "cut" : "mended"] the [GetWireName(wires[colour])] wire of airlock named \"[holder]\" at [holder.x],[holder.y],[holder.z].")
|
||||
holder.investigation_log(I_WIRES, "|| [GetWireName(wires[colour]) || colour] wire [IsColourCut(colour) ? "cut" : "mended"] by [key_name(usr)] ([src.type])")
|
||||
else
|
||||
to_chat(L, "<span class='error'>You need wirecutters!</span>")
|
||||
|
||||
@@ -128,7 +129,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
var/colour = href_list["pulse"]
|
||||
PulseColour(colour)
|
||||
log_attack("[key_name(usr)] has pulsed the [GetWireName(wires[colour])] wire of airlock named \"[holder]\" at [holder.x],[holder.y],[holder.z].")
|
||||
holder.investigation_log(I_WIRES, "|| [GetWireName(wires[colour]) || colour] wire pulsed by [key_name(usr)] ([src.type])")
|
||||
else
|
||||
to_chat(L, "<span class='error'>You need a multitool!</span>")
|
||||
|
||||
@@ -139,14 +140,14 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
var/obj/item/O = Detach(colour)
|
||||
if(O)
|
||||
L.put_in_hands(O)
|
||||
log_attack("[key_name(usr)] has detached the remote signaler on the [GetWireName(wires[colour])] wire of airlock named \"[holder]\" at [holder.x],[holder.y],[holder.z].")
|
||||
holder.investigation_log(I_WIRES, "|| [O] \ref[O] detached from [GetWireName(wires[colour]) || colour] wire by [key_name(usr)] ([src.type])")
|
||||
|
||||
// Attach
|
||||
else
|
||||
if(istype(I, /obj/item/device/assembly/signaler))
|
||||
if(L.drop_item(I))
|
||||
Attach(colour, I)
|
||||
log_attack("[key_name(usr)] has attached a remote signaler on the [GetWireName(wires[colour])] wire of airlock named \"[holder]\" at [holder.x],[holder.y],[holder.z].")
|
||||
holder.investigation_log(I_WIRES, "|| [I] \ref[I] attached to [GetWireName(wires[colour]) || colour] wire by [key_name(usr)] ([src.type])")
|
||||
else
|
||||
to_chat(L, "<span class='error'>You need a remote signaller!</span>")
|
||||
|
||||
@@ -263,7 +264,7 @@ var/const/POWER = 8
|
||||
for(var/colour in signallers)
|
||||
if(S == signallers[colour])
|
||||
PulseColour(colour)
|
||||
log_attack("The [GetWireName(wires[colour])] wire of airlock named \"[holder]\" at [holder.x],[holder.y],[holder.z] has been pulsed with [S], activated by [key_name(usr)].")
|
||||
holder.investigation_log(I_WIRES, "|| [GetWireName(wires[colour]) || colour] wire pulsed by \a [S] \ref[S] ([src.type])")
|
||||
break
|
||||
|
||||
|
||||
|
||||
@@ -772,7 +772,7 @@ About the new airlock wires panel:
|
||||
return 0
|
||||
src.locked = 1
|
||||
to_chat(usr, "The door is now bolted.")
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) bolted the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| bolted via robot interface by [key_name(usr)]")
|
||||
update_icon()
|
||||
if(5)
|
||||
//un-electrify door
|
||||
@@ -784,14 +784,14 @@ About the new airlock wires panel:
|
||||
return 0
|
||||
src.secondsElectrified = 0
|
||||
to_chat(usr, "The door is now un-electrified.")
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) un-electrified the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| un-electrified via robot interface by [key_name(usr)]")
|
||||
else if(src.secondsElectrified>0)
|
||||
if(isobserver(usr) && !canGhostWrite(usr,src,"electrified"))
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
return 0
|
||||
src.secondsElectrified = 0
|
||||
to_chat(usr, "The door is now un-electrified.")
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) un-electrified the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| un-electrified via robot interface by [key_name(usr)]")
|
||||
|
||||
if(8)
|
||||
// Safeties! We don't need no stinking safeties!
|
||||
@@ -802,7 +802,7 @@ About the new airlock wires panel:
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
return 0
|
||||
safe = 0
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) removed the safeties on the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| safeties removed via robot interface by [key_name(usr)]")
|
||||
else
|
||||
to_chat(usr, text("Firmware reports safeties already overriden."))
|
||||
|
||||
@@ -817,7 +817,7 @@ About the new airlock wires panel:
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
return 0
|
||||
normalspeed = 0
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) disrupted door timing on the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| door timing disrupted via robot interface by [key_name(usr)]")
|
||||
else
|
||||
to_chat(usr, text("Door timing circurity already accellerated."))
|
||||
|
||||
@@ -832,13 +832,13 @@ About the new airlock wires panel:
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
return 0
|
||||
close()
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) closed the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| closed via robot interface by [key_name(usr)]")
|
||||
else
|
||||
if(isobserver(usr) && !canGhostWrite(usr,src,"opened"))
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
return 0
|
||||
open()
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) opened the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| opened via robot interface by [key_name(usr)]")
|
||||
|
||||
if(10)
|
||||
// Bolt lights
|
||||
@@ -896,7 +896,7 @@ About the new airlock wires panel:
|
||||
else
|
||||
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) Temporarily electrified the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| temporarily electrified via robot interface by [key_name(usr)]")
|
||||
if(isobserver(usr) && !canGhostWrite(usr,src,"electrified (30sec)"))
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
return 0
|
||||
@@ -919,7 +919,7 @@ About the new airlock wires panel:
|
||||
else
|
||||
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) Electrified the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| electrified via robot interface by [key_name(usr)]")
|
||||
to_chat(usr, "The door is now electrified indefinitely.")
|
||||
if(isobserver(usr) && !canGhostWrite(usr,src,"electrified (permanent)"))
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
@@ -963,13 +963,13 @@ About the new airlock wires panel:
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
return 0
|
||||
open()
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) opened the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| opened via robot interface by [key_name(usr)]")
|
||||
else
|
||||
if(isobserver(usr) && !canGhostWrite(usr,src,"closed"))
|
||||
to_chat(usr, "<span class='warning'>Nope.</span>")
|
||||
return 0
|
||||
close()
|
||||
log_attack("<font color='red'>[usr] ([usr.ckey]) closed the [name] at [x] [y] [z]</font>")
|
||||
investigation_log(I_WIRES, "|| closed via robot interface by [key_name(usr)]")
|
||||
|
||||
if(10)
|
||||
// Bolt lights
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#define INVESTIGATE_DIR "data/investigate/"
|
||||
|
||||
// Just in case
|
||||
#define AVAILABLE_INVESTIGATIONS list(I_HREFS,I_NOTES,I_NTSL,I_SINGULO,I_ATMOS,I_CHEMS)
|
||||
#define AVAILABLE_INVESTIGATIONS list(I_HREFS,I_NOTES,I_NTSL,I_SINGULO,I_ATMOS,I_CHEMS,I_WIRES)
|
||||
|
||||
// Actual list of global controllers.
|
||||
var/global/list/investigations=list(
|
||||
@@ -21,7 +21,8 @@ var/global/list/investigations=list(
|
||||
I_NTSL = new /datum/log_controller(I_NTSL),
|
||||
I_SINGULO = new /datum/log_controller(I_SINGULO),
|
||||
I_ATMOS = null, //new /datum/log_controller("atmos",filename="data/logs/[date_string] atmos.htm", persist=TRUE),
|
||||
I_CHEMS = null // Set on world.New() with hrefs and atmos
|
||||
I_CHEMS = null, // Set on world.New()
|
||||
I_WIRES = null // Set on world.New()
|
||||
)
|
||||
|
||||
// Handles appending shit to log.
|
||||
@@ -67,7 +68,8 @@ var/global/list/investigations=list(
|
||||
|
||||
// Permits special snowflake formatting.
|
||||
/atom/proc/format_investigation_text(var/message)
|
||||
return "<small>[time2text(world.timeofday,"hh:mm:ss")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br />"
|
||||
var/turf/T = get_turf(src)
|
||||
return "<small>[time2text(world.timeofday,"hh:mm:ss")] \ref[src] ([T.x],[T.y],[T.z])</small> || [src] [message]<br />"
|
||||
|
||||
// For non-atoms or very specific messages.
|
||||
/proc/minimal_investigation_log(var/subject, var/message, var/prefix)
|
||||
|
||||
@@ -1471,6 +1471,7 @@ var/default_colour_matrix = list(1,0,0,0,\
|
||||
#define I_SINGULO "singulo"
|
||||
#define I_ATMOS "atmos"
|
||||
#define I_CHEMS "chems"
|
||||
#define I_WIRES "wires"
|
||||
|
||||
// delayNext() flags.
|
||||
#define DELAY_MOVE 1
|
||||
|
||||
@@ -35,6 +35,7 @@ var/savefile/panicfile
|
||||
investigations[I_HREFS] = new /datum/log_controller(I_HREFS, filename="data/logs/[date_string] hrefs.htm", persist=TRUE)
|
||||
investigations[I_ATMOS] = new /datum/log_controller(I_ATMOS, filename="data/logs/[date_string] atmos.htm", persist=TRUE)
|
||||
investigations[I_CHEMS] = new /datum/log_controller(I_CHEMS, filename="data/logs/[date_string] chemistry.htm", persist=TRUE)
|
||||
investigations[I_WIRES] = new /datum/log_controller(I_WIRES, filename="data/logs/[date_string] wires.htm", persist=TRUE)
|
||||
|
||||
diary = file("data/logs/[date_string].log")
|
||||
panicfile = new/savefile("data/logs/profiling/proclogs/[date_string].sav")
|
||||
|
||||
Reference in New Issue
Block a user