examine signature changed to include distance

- distance is INFINITE, 0, or a positive integer based on get_dist() between
the examiner and examinee's turfs when they are on the same Z. When the
examiner is dead or a ghost, distance is always 0.
- also updates /examine( implementations to use it!
- adds w_class_to_name proc for reusing "It is a X item." examine behavior.
This commit is contained in:
Spookerton
2024-01-31 13:49:52 +00:00
parent e3393dc87b
commit 978f4511a5
240 changed files with 524 additions and 551 deletions
@@ -87,7 +87,7 @@
/obj/machinery/atmospherics/unary/freezer/tgui_act(action, params)
if(..())
return TRUE
. = TRUE
switch(action)
if("toggleStatus")
@@ -169,7 +169,7 @@
..()
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
/obj/machinery/atmospherics/unary/freezer/examine(mob/user, distance, infix, suffix)
. = ..()
if(panel_open)
. += "The maintenance hatch is open."
@@ -156,7 +156,7 @@
..()
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
/obj/machinery/atmospherics/unary/heater/examine(mob/user, distance, infix, suffix)
. = ..()
if(panel_open)
. += "The maintenance hatch is open."
@@ -165,7 +165,7 @@
soundloop.stop()
return 0
if(!use_power)
soundloop.stop()
soundloop.stop()
return 0
if(welded)
soundloop.stop()
@@ -400,9 +400,9 @@
else
..()
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
. += "You are too far away to read the gauge."
@@ -286,9 +286,9 @@
"You hear a ratchet.")
deconstruct()
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
. += "You are too far away to read the gauge."