Ports "examine-code refactor"... part 1...

This commit is contained in:
Ghommie
2019-11-19 03:28:06 +01:00
parent d9b24b20d1
commit a52e292cc8
204 changed files with 739 additions and 756 deletions
+1 -1
View File
@@ -39,7 +39,7 @@
/obj/structure/AIcore/latejoin_inactive/examine(mob/user)
. = ..()
to_chat(user, "Its transmitter seems to be [active? "on" : "off"].")
. += "Its transmitter seems to be [active? "on" : "off"]."
/obj/structure/AIcore/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
if(!available)
@@ -23,9 +23,9 @@
var/bolts = TRUE
/obj/structure/bed/examine(mob/user)
..()
. = ..()
if(bolts)
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
. += "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>"
/obj/structure/bed/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -148,8 +148,8 @@
..()
/obj/item/roller/robo/examine(mob/user)
..()
to_chat(user, "The dock is [loaded ? "loaded" : "empty"].")
. = ..()
. += "The dock is [loaded ? "loaded" : "empty"]."
/obj/item/roller/robo/deploy_roller(mob/user, atom/location)
if(loaded)
@@ -15,10 +15,10 @@
layer = OBJ_LAYER
/obj/structure/chair/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
. = ..()
. += "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>"
if(!has_buckled_mobs())
to_chat(user, "<span class='notice'>Drag your sprite to sit in it.</span>")
. += "<span class='notice'>Drag your sprite to sit in it.</span>"
/obj/structure/chair/Initialize()
. = ..()
+4 -4
View File
@@ -294,13 +294,13 @@ LINEN BINS
var/obj/item/hidden = null
/obj/structure/bedsheetbin/examine(mob/user)
..()
. = ..()
if(amount < 1)
to_chat(user, "There are no sheets in the bin.")
. += "There are no sheets in the bin."
else if(amount == 1)
to_chat(user, "There is one sheet in the bin.")
. += "There is one sheet in the bin."
else
to_chat(user, "There are [amount] sheets in the bin.")
. += "There are [amount] sheets in the bin."
/obj/structure/bedsheetbin/update_icon()
@@ -84,22 +84,22 @@
add_overlay("unlocked")
/obj/structure/closet/examine(mob/user)
..()
. = ..()
if(welded)
to_chat(user, "<span class='notice'>It's <b>welded</b> shut.</span>")
. += "<span class='notice'>It's <b>welded</b> shut.</span>"
if(anchored)
to_chat(user, "<span class='notice'>It is <b>bolted</b> to the ground.</span>")
. += "<span class='notice'>It is <b>bolted</b> to the ground.</span>"
if(opened)
to_chat(user, "<span class='notice'>The parts are <b>welded</b> together.</span>")
. += "<span class='notice'>The parts are <b>welded</b> together.</span>"
else if(secure && !opened)
else if(broken)
to_chat(user, "<span class='notice'>The lock is <b>screwed</b> in.</span>")
. += "<span class='notice'>The lock is <b>screwed</b> in.</span>"
else if(secure)
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>")
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>"
if(isliving(user))
var/mob/living/L = user
if(HAS_TRAIT(L, TRAIT_SKITTISH))
to_chat(user, "<span class='notice'>Ctrl-Shift-click [src] to jump inside.</span>")
. += "<span class='notice'>Ctrl-Shift-click [src] to jump inside.</span>"
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(wall_mounted)
@@ -5,9 +5,9 @@
var/registered_name = null
/obj/structure/closet/secure_closet/personal/examine(mob/user)
..()
. = ..()
if(registered_name)
to_chat(user, "<span class='notice'>The display reads, \"Owned by [registered_name]\".</span>")
. += "<span class='notice'>The display reads, \"Owned by [registered_name]\".</span>"
/obj/structure/closet/secure_closet/personal/check_access(obj/item/card/id/I)
. = ..()
+5 -5
View File
@@ -38,14 +38,14 @@
return ..()
/obj/structure/displaycase/examine(mob/user)
..()
. = ..()
if(alert)
to_chat(user, "<span class='notice'>Hooked up with an anti-theft system.</span>")
. += "<span class='notice'>Hooked up with an anti-theft system.</span>"
if(showpiece)
to_chat(user, "<span class='notice'>There's [showpiece] inside.</span>")
. += "<span class='notice'>There's [showpiece] inside.</span>"
if(trophy_message)
to_chat(user, "The plaque reads:")
to_chat(user, trophy_message)
. += "The plaque reads:"
. += trophy_message
/obj/structure/displaycase/proc/dump()
@@ -26,28 +26,28 @@
..()
/obj/structure/door_assembly/examine(mob/user)
..()
. = ..()
var/doorname = ""
if(created_name)
doorname = ", written on it is '[created_name]'"
switch(state)
if(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
if(anchored)
to_chat(user, "<span class='notice'>The anchoring bolts are <b>wrenched</b> in place, but the maintenance panel lacks <i>wiring</i>.</span>")
. += "<span class='notice'>The anchoring bolts are <b>wrenched</b> in place, but the maintenance panel lacks <i>wiring</i>.</span>"
else
to_chat(user, "<span class='notice'>The assembly is <b>welded together</b>, but the anchoring bolts are <i>unwrenched</i>.</span>")
. += "<span class='notice'>The assembly is <b>welded together</b>, but the anchoring bolts are <i>unwrenched</i>.</span>"
if(AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
to_chat(user, "<span class='notice'>The maintenance panel is <b>wired</b>, but the circuit slot is <i>empty</i>.</span>")
. += "<span class='notice'>The maintenance panel is <b>wired</b>, but the circuit slot is <i>empty</i>.</span>"
if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
to_chat(user, "<span class='notice'>The circuit is <b>connected loosely</b> to its slot, but the maintenance panel is <i>unscrewed and open</i>.</span>")
. += "<span class='notice'>The circuit is <b>connected loosely</b> to its slot, but the maintenance panel is <i>unscrewed and open</i>.</span>"
if(!mineral && !glass && !noglass)
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows and mineral covers.</span>")
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows and mineral covers.</span>"
else if(!mineral && glass && !noglass)
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for mineral covers.</span>")
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for mineral covers.</span>"
else if(mineral && !glass && !noglass)
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows.</span>")
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows.</span>"
else
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>")
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>"
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
+2 -2
View File
@@ -22,8 +22,8 @@
stored_extinguisher = new /obj/item/extinguisher(src)
/obj/structure/extinguisher_cabinet/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to [opened ? "close":"open"] it.</span>")
. = ..()
. += "<span class='notice'>Alt-click to [opened ? "close":"open"] it.</span>"
/obj/structure/extinguisher_cabinet/Destroy()
if(stored_extinguisher)
+5 -15
View File
@@ -23,24 +23,14 @@
var/current_action = 0 // What's currently happening to the femur breaker
/obj/structure/femur_breaker/examine(mob/user)
..()
var/msg = ""
msg += "It is [anchored ? "secured to the floor." : "unsecured."]<br/>"
. = ..()
. += "It is [anchored ? "secured to the floor." : "unsecured."]"
if (slat_status == BREAKER_SLAT_RAISED)
msg += "The breaker slat is in a neutral position."
. += "The breaker slat is in a neutral position."
else
msg += "The breaker slat is lowered, and must be raised."
. += "The breaker slat is lowered, and must be raised."
if (LAZYLEN(buckled_mobs))
msg += "<br/>"
msg += "Someone appears to be strapped in. You can help them unbuckle, or activate the femur breaker."
to_chat(user, msg)
return msg
. += "Someone appears to be strapped in. You can help them unbuckle, or activate the femur breaker."
/obj/structure/femur_breaker/attack_hand(mob/user)
add_fingerprint(user)
+3 -4
View File
@@ -29,13 +29,12 @@
update_cut_status()
/obj/structure/fence/examine(mob/user)
.=..()
. = ..()
switch(hole_size)
if(MEDIUM_HOLE)
user.show_message("There is a large hole in \the [src].")
. += "There is a large hole in \the [src]."
if(LARGE_HOLE)
user.show_message("\The [src] has been completely cut through.")
. += "\The [src] has been completely cut through."
/obj/structure/fence/end
icon_state = "end"
+5 -5
View File
@@ -15,16 +15,16 @@
. = ..()
switch(state)
if(GIRDER_REINF)
to_chat(user, "<span class='notice'>The support struts are <b>screwed</b> in place.</span>")
. += "<span class='notice'>The support struts are <b>screwed</b> in place.</span>"
if(GIRDER_REINF_STRUTS)
to_chat(user, "<span class='notice'>The support struts are <i>unscrewed</i> and the inner <b>grille</b> is intact.</span>")
. += "<span class='notice'>The support struts are <i>unscrewed</i> and the inner <b>grille</b> is intact.</span>"
if(GIRDER_NORMAL)
if(can_displace)
to_chat(user, "<span class='notice'>The bolts are <b>wrenched</b> in place.</span>")
. += "<span class='notice'>The bolts are <b>wrenched</b> in place.</span>"
if(GIRDER_DISPLACED)
to_chat(user, "<span class='notice'>The bolts are <i>loosened</i>, but the <b>screws</b> are holding [src] together.</span>")
. += "<span class='notice'>The bolts are <i>loosened</i>, but the <b>screws</b> are holding [src] together.</span>"
if(GIRDER_DISASSEMBLED)
to_chat(user, "<span class='notice'>[src] is disassembled! You probably shouldn't be able to see this examine message.</span>")
. += "<span class='notice'>[src] is disassembled! You probably shouldn't be able to see this examine message.</span>"
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
+4 -4
View File
@@ -37,11 +37,11 @@
icon_state = "grille50_[rand(0,3)]"
/obj/structure/grille/examine(mob/user)
..()
. = ..()
if(anchored)
to_chat(user, "<span class='notice'>It's secured in place with <b>screws</b>. The rods look like they could be <b>cut</b> through.</span>")
if(!anchored)
to_chat(user, "<span class='notice'>The anchoring screws are <i>unscrewed</i>. The rods look like they could be <b>cut</b> through.</span>")
. += "<span class='notice'>It's secured in place with <b>screws</b>. The rods look like they could be <b>cut</b> through.</span>"
else
. += "<span class='notice'>The anchoring screws are <i>unscrewed</i>. The rods look like they could be <b>cut</b> through.</span>"
/obj/structure/grille/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
switch(the_rcd.mode)
+7 -13
View File
@@ -34,29 +34,23 @@
. = ..()
/obj/structure/guillotine/examine(mob/user)
..()
var/msg = ""
msg += "It is [anchored ? "wrenched to the floor." : "unsecured. A wrench should fix that."]<br/>"
. = ..()
. += "It is [anchored ? "wrenched to the floor." : "unsecured. A wrench should fix that."]<br/>"
msg = ""
if (blade_status == GUILLOTINE_BLADE_RAISED)
msg += "The blade is raised, ready to fall, and"
var/msg = "The blade is raised, ready to fall, and"
if (blade_sharpness >= GUILLOTINE_DECAP_MIN_SHARP)
msg += " looks sharp enough to decapitate without any resistance."
else
msg += " doesn't look particularly sharp. Perhaps a whetstone can be used to sharpen it."
. += msg
else
msg += "The blade is hidden inside the stocks."
. += "The blade is hidden inside the stocks."
if (LAZYLEN(buckled_mobs))
msg += "<br/>"
msg += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
to_chat(user, msg)
return msg
. += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
/obj/structure/guillotine/attack_hand(mob/user)
add_fingerprint(user)
+2 -2
View File
@@ -105,8 +105,8 @@
var/buzzcd = 0
/obj/structure/holosign/barrier/medical/examine(mob/user)
..()
to_chat(user,"<span class='notice'>The biometric scanners are <b>[force_allaccess ? "off" : "on"]</b>.</span>")
. = ..()
. += "<span class='notice'>The biometric scanners are <b>[force_allaccess ? "off" : "on"]</b>.</span>"
/obj/structure/holosign/barrier/medical/CanPass(atom/movable/mover, turf/target)
icon_state = "holo_medical"
+2 -2
View File
@@ -19,10 +19,10 @@
/obj/structure/lattice/examine(mob/user)
..()
deconstruction_hints(user)
. += deconstruction_hints(user)
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>")
return "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>"
/obj/structure/lattice/Initialize(mapload)
. = ..()
+2 -2
View File
@@ -55,9 +55,9 @@
/obj/structure/life_candle/examine(mob/user)
. = ..()
if(linked_minds.len)
to_chat(user, "[src] is active, and linked to [linked_minds.len] souls.")
. += "[src] is active, and linked to [linked_minds.len] souls."
else
to_chat(user, "It is static, still, unmoving.")
. += "It is static, still, unmoving."
/obj/structure/life_candle/process()
if(!linked_minds.len)
+2 -2
View File
@@ -163,8 +163,8 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
..()
/obj/structure/bodycontainer/morgue/examine(mob/user)
..()
to_chat(user, "<span class='notice'>The speaker is [beeper ? "enabled" : "disabled"]. Alt-click to toggle it.</span>")
. = ..()
. += "<span class='notice'>The speaker is [beeper ? "enabled" : "disabled"]. Alt-click to toggle it.</span>"
/obj/structure/bodycontainer/morgue/AltClick(mob/user)
..()
+2 -2
View File
@@ -15,9 +15,9 @@
/obj/structure/plasticflaps/examine(mob/user)
. = ..()
if(anchored)
to_chat(user, "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>")
. += "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>"
else
to_chat(user, "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>cut</b> apart.</span>")
. += "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>cut</b> apart.</span>"
/obj/structure/plasticflaps/screwdriver_act(mob/living/user, obj/item/W)
if(..())
+4 -4
View File
@@ -34,14 +34,14 @@
can_rotate = FALSE
/obj/structure/reflector/examine(mob/user)
..()
. = ..()
if(finished)
to_chat(user, "It is set to [rotation_angle] degrees, and the rotation is [can_rotate ? "unlocked" : "locked"].")
. += "It is set to [rotation_angle] degrees, and the rotation is [can_rotate ? "unlocked" : "locked"]."
if(!admin)
if(can_rotate)
to_chat(user, "<span class='notice'>Alt-click to adjust its direction.</span>")
. += "<span class='notice'>Alt-click to adjust its direction.</span>"
else
to_chat(user, "<span class='notice'>Use screwdriver to unlock the rotation.</span>")
. += "<span class='notice'>Use screwdriver to unlock the rotation.</span>"
/obj/structure/reflector/proc/setAngle(new_angle)
if(can_rotate)
+4 -5
View File
@@ -131,12 +131,11 @@
//Feedback is given in examine because showcases can basically have any sprite assigned to them
/obj/structure/showcase/examine(mob/user)
..()
. = ..()
switch(deconstruction_state)
if(SHOWCASE_CONSTRUCTED)
to_chat(user, "The showcase is fully constructed.")
. += "The showcase is fully constructed."
if(SHOWCASE_SCREWDRIVERED)
to_chat(user, "The showcase has its screws loosened.")
. += "The showcase has its screws loosened."
else
to_chat(user, "If you see this, something is wrong.")
. += "If you see this, something is wrong."
+1 -1
View File
@@ -12,7 +12,7 @@
/obj/structure/spirit_board/examine()
desc = "[initial(desc)] The planchette is sitting at \"[planchette]\"."
..()
return ..()
/obj/structure/spirit_board/attack_hand(mob/user)
. = ..()
+7 -8
View File
@@ -36,11 +36,11 @@
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
/obj/structure/table/examine(mob/user)
..()
deconstruction_hints(user)
. = ..()
. += deconstruction_hints(user)
/obj/structure/table/proc/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>")
return "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>"
/obj/structure/table/update_icon()
if(smooth)
@@ -452,9 +452,8 @@
/obj/structure/table/reinforced/deconstruction_hints(mob/user)
if(deconstruction_ready)
to_chat(user, "<span class='notice'>The top cover has been <i>welded</i> loose and the main frame's <b>bolts</b> are exposed.</span>")
else
to_chat(user, "<span class='notice'>The top cover is firmly <b>welded</b> on.</span>")
return "<span class='notice'>The top cover has been <i>welded</i> loose and the main frame's <b>bolts</b> are exposed.</span>"
return "<span class='notice'>The top cover is firmly <b>welded</b> on.</span>"
/obj/structure/table/reinforced/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool))
@@ -582,8 +581,8 @@
max_integrity = 20
/obj/structure/rack/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
. = ..()
. += "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
/obj/structure/rack/CanPass(atom/movable/mover, turf/target)
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
+1 -1
View File
@@ -38,7 +38,7 @@
if(user.mind && user.mind in immune_minds)
return
if(get_dist(user, src) <= 1)
to_chat(user, "<span class='notice'>You reveal [src]!</span>")
. += "<span class='notice'>You reveal [src]!</span>"
flare()
/obj/structure/trap/proc/flare()
+7 -7
View File
@@ -29,21 +29,21 @@
rad_flags = RAD_PROTECT_CONTENTS
/obj/structure/window/examine(mob/user)
..()
. = ..()
if(reinf)
if(anchored && state == WINDOW_SCREWED_TO_FRAME)
to_chat(user, "<span class='notice'>The window is <b>screwed</b> to the frame.</span>")
. += "<span class='notice'>The window is <b>screwed</b> to the frame.</span>"
else if(anchored && state == WINDOW_IN_FRAME)
to_chat(user, "<span class='notice'>The window is <i>unscrewed</i> but <b>pried</b> into the frame.</span>")
. += "<span class='notice'>The window is <i>unscrewed</i> but <b>pried</b> into the frame.</span>"
else if(anchored && state == WINDOW_OUT_OF_FRAME)
to_chat(user, "<span class='notice'>The window is out of the frame, but could be <i>pried</i> in. It is <b>screwed</b> to the floor.</span>")
. += "<span class='notice'>The window is out of the frame, but could be <i>pried</i> in. It is <b>screwed</b> to the floor.</span>"
else if(!anchored)
to_chat(user, "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>")
. += "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>"
else
if(anchored)
to_chat(user, "<span class='notice'>The window is <b>screwed</b> to the floor.</span>")
. += "<span class='notice'>The window is <b>screwed</b> to the floor.</span>"
else
to_chat(user, "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>")
. += "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>"
/obj/structure/window/Initialize(mapload, direct)
. = ..()