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
+2 -3
View File
@@ -102,9 +102,9 @@ var/global/list/rad_collectors = list()
return 1
return ..()
/obj/machinery/power/rad_collector/examine(mob/user)
/obj/machinery/power/rad_collector/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) <= 3)
if(distance <= 3)
. += "The meter indicates that it is collecting [last_power] W."
/obj/machinery/power/rad_collector/ex_act(severity)
@@ -157,4 +157,3 @@ var/global/list/rad_collectors = list()
flick("ca_deactive", src)
update_icons()
return
+2 -2
View File
@@ -266,7 +266,7 @@
if(src)
qdel(src)
/obj/machinery/power/emitter/examine(mob/user)
/obj/machinery/power/emitter/examine(mob/user, distance, infix, suffix)
. = ..()
var/integrity_percentage = round((integrity / initial(integrity)) * 100)
switch(integrity_percentage)
@@ -288,4 +288,4 @@
return burst_delay
/obj/machinery/power/emitter/proc/get_emitter_beam()
return new /obj/item/projectile/beam/emitter(get_turf(src))
return new /obj/item/projectile/beam/emitter(get_turf(src))
@@ -111,9 +111,9 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
src.set_dir(turn(src.dir, 90))
return 1
/obj/structure/particle_accelerator/examine(mob/user)
/obj/structure/particle_accelerator/examine(mob/user, distance, infix, suffix)
. = ..()
switch(construction_state)
if(0)
. += "Looks like it's not attached to the flooring."
@@ -290,9 +290,9 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/machinery/particle_accelerator/update_icon()
return
/obj/machinery/particle_accelerator/examine(mob/user)
/obj/machinery/particle_accelerator/examine(mob/user, distance, infix, suffix)
. = ..()
switch(construction_state)
if(0)
. += "Looks like it's not attached to the flooring."
@@ -36,9 +36,9 @@
recipes.Cut()
..()
/obj/machinery/particle_smasher/examine(mob/user)
/obj/machinery/particle_smasher/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "<span class='notice'>\The [src] contains:</span>"
for(var/obj/item/I in contents)
. += "<span class='notice'>\the [I]</span>"
@@ -378,4 +378,4 @@
required_atmos_temp_min = 3000
required_atmos_temp_max = 10000
probability = 1
probability = 1