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
@@ -30,7 +30,7 @@
if(81 to 100)
add_overlay("bees3")
/obj/machinery/beehive/examine(var/mob/user)
/obj/machinery/beehive/examine(mob/user, distance, infix, suffix)
. = ..()
if(!closed)
. += "The lid is open."
+1 -1
View File
@@ -5,7 +5,7 @@
. = ..()
seeds = rand(1, 2)
/obj/item/reagent_containers/food/snacks/grown/sif/examine(mob/user)
/obj/item/reagent_containers/food/snacks/grown/sif/examine(mob/user, distance, infix, suffix)
. = ..()
if(seeds)
. += SPAN_NOTICE("You can see [seeds] seed\s in \the [src]. You might be able to extract them with a sharp object.")
+1 -1
View File
@@ -61,7 +61,7 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds)
src.name = "sample of [seed.seed_name] [seed.seed_noun]"
src.desc = "It's labelled as coming from [seed.display_name]."
/obj/item/seeds/examine(mob/user)
/obj/item/seeds/examine(mob/user, distance, infix, suffix)
. = ..()
if(seed && !seed.roundstart)
. += "It's tagged as variety #[seed.uid]."
+3 -3
View File
@@ -635,7 +635,7 @@
else if(dead)
remove_dead(user)
/obj/machinery/portable_atmospherics/hydroponics/examine(mob/user)
/obj/machinery/portable_atmospherics/hydroponics/examine(mob/user, distance, infix, suffix)
. = ..()
if(seed)
@@ -643,8 +643,8 @@
else
. += "It is empty."
if(!Adjacent(user))
return .
if(distance > 2)
return
. += "Water: [round(waterlevel,0.1)]/100"
. += "Nutrient: [round(nutrilevel,0.1)]/10"