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
@@ -171,9 +171,9 @@
if(id_card)
return id_card
/obj/item/electronic_assembly/examine(mob/user)
/obj/item/electronic_assembly/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
for(var/obj/item/integrated_circuit/IC in contents)
. += IC.external_examine(user)
if(opened)
@@ -359,4 +359,4 @@
// Returns TRUE if I is something that could/should have a valid interaction. Used to tell circuitclothes to hit the circuit with something instead of the clothes
/obj/item/electronic_assembly/proc/is_valid_tool(var/obj/item/I)
return I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/cell/device) || istype(I, /obj/item/integrated_electronics)
return I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/cell/device) || istype(I, /obj/item/integrated_electronics)