mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-25 22:28:00 +01:00
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:
@@ -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."
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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]."
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user