From 3958de2de43e19e4b26a08bb5788ce57597d82eb Mon Sep 17 00:00:00 2001 From: Shadow-Quill <44811257+Shadow-Quill@users.noreply.github.com> Date: Tue, 11 Oct 2022 02:11:23 -0500 Subject: [PATCH] Adds some examine helpers (#18997) * Adds some examine helpers * Includes suggestions * Macroifies some "the"s * Update code/game/machinery/camera/camera.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/game/objects/items/devices/radio/intercom.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> --- code/game/machinery/camera/camera.dm | 11 ++++++++++ code/game/machinery/camera/camera_assembly.dm | 13 ++++++++++++ .../game/machinery/computer/buildandrepair.dm | 17 ++++++++++++++++ code/game/machinery/firealarm.dm | 10 ++++++++++ .../objects/items/devices/radio/intercom.dm | 10 ++++++++++ .../atmospherics/machinery/airalarm.dm | 9 +++++---- code/modules/power/lighting.dm | 15 +++++++------- .../particle_accelerator.dm | 20 ++++++++++--------- code/modules/power/solar.dm | 9 +++++++++ 9 files changed, 94 insertions(+), 20 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 1c8736be085..24c01a42ac0 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -69,6 +69,17 @@ cancelAlarm() return ..() +/obj/machinery/camera/examine(mob/user) + . = ..() + . += "[src]'s maintenance panel can be screwed [panel_open ? "closed" : "open"]." + if(panel_open) + . += "Upgrades can be added to [src] or pried out." + if(!wires.CanDeconstruct()) + . += "[src]'s internal wires are preventing you from cutting it free." + else + . += "[src]'s internal wires are disconnected, but it can be cut free." + + /obj/machinery/camera/emp_act(severity) if(!status) return diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 1e3d9154d86..f1a2cd29131 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -23,6 +23,19 @@ QDEL_LIST(upgrades) return ..() +/obj/item/camera_assembly/examine(mob/user) + . = ..() + switch(state) + if(ASSEMBLY_UNBUILT) + . += "The camera assembly's bolts need to be secured in a wall." + if(ASSEMBLY_WRENCHED) + . += "The camera assembly is bolted, but it needs to be welded into place." + if(ASSEMBLY_WELDED) + . += "The camera assembly is welded to the wall, it's lacking wires." + if(ASSEMBLY_WIRED) + . += "The camera assembly is wired, but the maintenence panel needs to be screwed shut." + . += "Upgrades can be added to the camera assembly, and removed with a crowbar." + /obj/item/camera_assembly/attackby(obj/item/I, mob/living/user, params) if(state == ASSEMBLY_WELDED && iscoil(I)) var/obj/item/stack/cable_coil/C = I diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 94625961bc7..0928d100024 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -422,6 +422,23 @@ var/state = STATE_EMPTY var/obj/item/circuitboard/circuit = null +/obj/structure/computerframe/examine(mob/user) + . = ..() + . += "It is [anchored ? "bolted to the floor" : "unbolted"]." + switch(state) + if(STATE_EMPTY) + . += "The frame is welded together, but it is missing a circuit board." + if(STATE_CIRCUIT) + . += "A circuit board is firmly connected, but the cover is unscrewed and open." + if(STATE_NOWIRES) + . += "The cover is screwed shut, but the frame is missing wiring." + if(STATE_WIRES) + . += "The frame is wired, but the glass is missing." + if(STATE_GLASS) + . += "The glass is loosely connected and needs to be screwed into place." + if(!anchored) + . += "Alt-Click to rotate it." + /obj/structure/computerframe/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) drop_computer_parts() diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index b7c0922bcec..775d20741e9 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -272,6 +272,16 @@ FIRE ALARM /obj/machinery/firealarm/examine(mob/user) . = ..() + switch(buildstage) + if(FIRE_ALARM_FRAME) + . += "It's missing a circuit board and the bolts are exposed." + if(FIRE_ALARM_UNWIRED) + . += "The control board needs wiring and can be pried out." + if(FIRE_ALARM_READY) + if(wiresexposed) + . += "The fire alarm's wires are exposed by the unscrewed panel." + . += "The detection circuitry can be turned [detecting ? "off" : "on"] by pulsing the board." + . += "It shows the alert level as: [capitalize(get_security_level())]." /obj/machinery/firealarm/proc/reset() diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 5a6e0c88835..e12fe861e3b 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -141,6 +141,16 @@ return canhear_range +/obj/item/radio/intercom/examine(mob/user) + . = ..() + switch(buildstage) + if(0) + . += "The frame is welded to the wall, but missing circuitry." + if(1) + . += "The speaker needs to be wired, though the board could be pried out." + if(2) + . += "The intercom is wired, and the maintenance panel is unscrewed." + /obj/item/radio/intercom/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/stack/tape_roll)) //eww return diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 41e77fdc8d1..d6d94707a74 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -1100,10 +1100,11 @@ /obj/machinery/alarm/examine(mob/user) . = ..() - if(buildstage < 2) - . += "It is not wired." - if(buildstage < 1) - . += "The circuit is missing." + switch(buildstage) + if(AIR_ALARM_FRAME) + . += "Its circuit is missing and the bolts are exposed." + if(AIR_ALARM_BUILDING) + . += "The frame is missing wires and the control circuit can be pried out." /obj/machinery/alarm/proc/unshort_callback() if(shorted) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 5e99f742a29..c78fe50b02a 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -49,11 +49,11 @@ if(get_dist(user, src) <= 2) switch(stage) if(1) - . += "It's an empty frame." + . += "It's an empty frame bolted to the wall. It needs to be wired." if(2) - . += "It's wired." + . += "The frame is wired, but the casing's cover is unscrewed." if(3) - . += "The casing is closed." + . += "The casing is screwed shut." /obj/machinery/light_construct/wrench_act(mob/living/user, obj/item/I) . = TRUE @@ -418,13 +418,14 @@ if(in_range(user, src)) switch(status) if(LIGHT_OK) - . += "It is turned [on? "on" : "off"]." + . += "It is turned [on ? "on" : "off"]." if(LIGHT_EMPTY) - . += "The [fitting] has been removed." + . += "The [fitting] has been removed." + . += "The casing can be unscrewed." if(LIGHT_BURNED) - . += "The [fitting] is burnt out." + . += "The [fitting] is burnt out." if(LIGHT_BROKEN) - . += "The [fitting] has been smashed." + . += "The [fitting] has been smashed." // attack with item - insert light (if right type), otherwise try to break the light diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 7fabc07bfb2..f69ce27f8d6 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -122,18 +122,20 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return 1 /obj/structure/particle_accelerator/examine(mob/user) + . = ..() switch(construction_state) - if(0) - desc = text("A [name], looks like it's not attached to the flooring") - if(1) - desc = text("A [name], it is missing some cables") - if(2) - desc = text("A [name], the panel is open") - if(3) - desc = text("The [name] is assembled") + if(ACCELERATOR_UNWRENCHED) + . += "\The [name]'s anchoring bolts are loose." + if(ACCELERATOR_WRENCHED) + . += "\The [name]'s anchoring bolts are wrenched in place, but it lacks wiring." + if(ACCELERATOR_WIRED) + . += "\The [name] is wired, but the maintenance panel is unscrewed and open." + if(ACCELERATOR_READY) + . += "\The [name] is assembled and the maintenence panel is screwed shut." if(powered) desc = desc_holder - . = ..() + if(!anchored) + . += "Alt-click to rotate it." /obj/structure/particle_accelerator/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 2bad3dcc1d6..a55f965a20d 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -198,6 +198,15 @@ S.amount = 2 glass_type = null +/obj/item/solar_assembly/examine(mob/user) + . = ..() + . += "The solar assembly is [anchored ? "wrenched into place" : "unwrenched"]." + if(tracker) + . += "The solar assembly has a tracking circuit installed. It can be pried out." + else + . += "The solar assembly has a slot for a tracking circuit board." + if(anchored) + .+= "The solar assembly needs glass to be completed." /obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)