diff --git a/code/datums/wires/alarm.dm b/code/datums/wires/alarm.dm index 82bbd3ae221..30e3a602e28 100644 --- a/code/datums/wires/alarm.dm +++ b/code/datums/wires/alarm.dm @@ -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 diff --git a/code/datums/wires/apc.dm b/code/datums/wires/apc.dm index 96075d5941f..b0a6dd6ca44 100644 --- a/code/datums/wires/apc.dm +++ b/code/datums/wires/apc.dm @@ -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 @@ -75,4 +84,4 @@ var/const/APC_WIRE_AI_CONTROL = 8 else if (A.aidisabled == 1) A.aidisabled = 0 - A.updateDialog() \ No newline at end of file + A.updateDialog() diff --git a/code/datums/wires/camera.dm b/code/datums/wires/camera.dm index 9c87adb95b7..022ff084c94 100644 --- a/code/datums/wires/camera.dm +++ b/code/datums/wires/camera.dm @@ -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() . = ..() @@ -73,4 +84,4 @@ var/const/CAMERA_WIRE_NOTHING2 = 32 if(IsIndexCut(CAMERA_WIRE_POWER) && IsIndexCut(CAMERA_WIRE_FOCUS) && IsIndexCut(CAMERA_WIRE_LIGHT) && IsIndexCut(CAMERA_WIRE_NOTHING1) && IsIndexCut(CAMERA_WIRE_NOTHING2)) return 1 else - return 0 \ No newline at end of file + return 0 diff --git a/code/datums/wires/jukebox.dm b/code/datums/wires/jukebox.dm index 5ef80101431..162e1d865ee 100644 --- a/code/datums/wires/jukebox.dm +++ b/code/datums/wires/jukebox.dm @@ -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. diff --git a/code/datums/wires/mulebot.dm b/code/datums/wires/mulebot.dm index 5ebbc58edc0..9e875bcc489 100644 --- a/code/datums/wires/mulebot.dm +++ b/code/datums/wires/mulebot.dm @@ -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 @@ -69,4 +83,4 @@ var/const/WIRE_BEACON_RX = 256 // beacon ping recv return !(wires_status & WIRE_REMOTE_RX) /datum/wires/mulebot/proc/BeaconRX() - return !(wires_status & WIRE_BEACON_RX) \ No newline at end of file + return !(wires_status & WIRE_BEACON_RX) diff --git a/code/datums/wires/particle_accelerator.dm b/code/datums/wires/particle_accelerator.dm index cfd1c47e18b..e8d07514927 100644 --- a/code/datums/wires/particle_accelerator.dm +++ b/code/datums/wires/particle_accelerator.dm @@ -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. @@ -54,4 +63,4 @@ var/const/PARTICLE_LIMIT_POWER_WIRE = 8 // Determines how strong the PA can be. if(PARTICLE_LIMIT_POWER_WIRE) C.strength_upper_limit = (mended ? 2 : 3) if(C.strength_upper_limit < C.strength) - C.remove_strength() \ No newline at end of file + C.remove_strength() diff --git a/code/datums/wires/radio.dm b/code/datums/wires/radio.dm index a8171270008..4e7bc07d5cc 100644 --- a/code/datums/wires/radio.dm +++ b/code/datums/wires/radio.dm @@ -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 @@ -28,4 +36,4 @@ var/const/WIRE_TRANSMIT = 4 R.listening = !R.listening if(WIRE_TRANSMIT) - R.broadcasting = !R.broadcasting \ No newline at end of file + R.broadcasting = !R.broadcasting diff --git a/code/datums/wires/rnd_wires.dm b/code/datums/wires/rnd_wires.dm index b31e884101d..830aed9e044 100644 --- a/code/datums/wires/rnd_wires.dm +++ b/code/datums/wires/rnd_wires.dm @@ -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 diff --git a/code/datums/wires/robot.dm b/code/datums/wires/robot.dm index 2e4606e76b2..ed17fedadaf 100644 --- a/code/datums/wires/robot.dm +++ b/code/datums/wires/robot.dm @@ -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 @@ -93,4 +103,4 @@ var/const/BORG_WIRE_LAWCHECK = 16 // Not used on MoMMIs return wires_status & BORG_WIRE_LAWCHECK /datum/wires/robot/proc/AIHasControl() - return wires_status & BORG_WIRE_AI_CONTROL \ No newline at end of file + return wires_status & BORG_WIRE_AI_CONTROL diff --git a/code/datums/wires/transmitter.dm b/code/datums/wires/transmitter.dm index ec4563ca521..5e8c8413355 100644 --- a/code/datums/wires/transmitter.dm +++ b/code/datums/wires/transmitter.dm @@ -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. diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm index 3b4f4865119..b6223615009 100644 --- a/code/datums/wires/vending.dm +++ b/code/datums/wires/vending.dm @@ -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 @@ -57,4 +66,4 @@ var/const/VENDING_WIRE_IDSCAN = 8 else V.seconds_electrified = -1 if(VENDING_WIRE_IDSCAN) - V.scan_id = 1 \ No newline at end of file + V.scan_id = 1 diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 53d6e9b27c3..f89b59e5060 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -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 = "
" @@ -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, "You need wirecutters!") @@ -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, "You need a multitool!") @@ -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, "You need a remote signaller!") @@ -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 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 799fc20c133..42a7dc0e2ed 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -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("[usr] ([usr.ckey]) bolted the [name] at [x] [y] [z]") + 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("[usr] ([usr.ckey]) un-electrified the [name] at [x] [y] [z]") + 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, "Nope.") return 0 src.secondsElectrified = 0 to_chat(usr, "The door is now un-electrified.") - log_attack("[usr] ([usr.ckey]) un-electrified the [name] at [x] [y] [z]") + 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, "Nope.") return 0 safe = 0 - log_attack("[usr] ([usr.ckey]) removed the safeties on the [name] at [x] [y] [z]") + 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, "Nope.") return 0 normalspeed = 0 - log_attack("[usr] ([usr.ckey]) disrupted door timing on the [name] at [x] [y] [z]") + 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, "Nope.") return 0 close() - log_attack("[usr] ([usr.ckey]) closed the [name] at [x] [y] [z]") + investigation_log(I_WIRES, "|| closed via robot interface by [key_name(usr)]") else if(isobserver(usr) && !canGhostWrite(usr,src,"opened")) to_chat(usr, "Nope.") return 0 open() - log_attack("[usr] ([usr.ckey]) opened the [name] at [x] [y] [z]") + 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()]\] Electrified the [name] at [x] [y] [z]") - log_attack("[usr] ([usr.ckey]) Temporarily electrified the [name] at [x] [y] [z]") + investigation_log(I_WIRES, "|| temporarily electrified via robot interface by [key_name(usr)]") if(isobserver(usr) && !canGhostWrite(usr,src,"electrified (30sec)")) to_chat(usr, "Nope.") 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()]\] Electrified the [name] at [x] [y] [z]") - log_attack("[usr] ([usr.ckey]) Electrified the [name] at [x] [y] [z]") + 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, "Nope.") @@ -963,13 +963,13 @@ About the new airlock wires panel: to_chat(usr, "Nope.") return 0 open() - log_attack("[usr] ([usr.ckey]) opened the [name] at [x] [y] [z]") + investigation_log(I_WIRES, "|| opened via robot interface by [key_name(usr)]") else if(isobserver(usr) && !canGhostWrite(usr,src,"closed")) to_chat(usr, "Nope.") return 0 close() - log_attack("[usr] ([usr.ckey]) closed the [name] at [x] [y] [z]") + investigation_log(I_WIRES, "|| closed via robot interface by [key_name(usr)]") if(10) // Bolt lights diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 1f52cffa5ba..6706baed521 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -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 "[time2text(world.timeofday,"hh:mm:ss")] \ref[src] ([x],[y],[z]) || [src] [message]
" + var/turf/T = get_turf(src) + return "[time2text(world.timeofday,"hh:mm:ss")] \ref[src] ([T.x],[T.y],[T.z]) || [src] [message]
" // For non-atoms or very specific messages. /proc/minimal_investigation_log(var/subject, var/message, var/prefix) diff --git a/code/setup.dm b/code/setup.dm index 219b8ffe842..890a97a1520 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -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 diff --git a/code/world.dm b/code/world.dm index 2f2f75f2ade..cc0e14b9426 100644 --- a/code/world.dm +++ b/code/world.dm @@ -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")