mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-19 04:05:56 +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:
@@ -117,9 +117,9 @@
|
||||
var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]]
|
||||
to_chat(usr, "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/examine(mob/user)
|
||||
/obj/item/reagent_containers/borghypo/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
if(distance < 3)
|
||||
var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]]
|
||||
. += "<span class='notice'>It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left.</span>"
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
drop_sound = 'sound/items/drop/glass.ogg'
|
||||
pickup_sound = 'sound/items/pickup/glass.ogg'
|
||||
|
||||
/obj/item/reagent_containers/dropper/examine(var/mob/user)
|
||||
/obj/item/reagent_containers/dropper/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
if(distance < 3)
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
. += "<span class='notice'>It contains [reagents.total_volume] units of liquid.</span>"
|
||||
else
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
base_name = name
|
||||
base_desc = desc
|
||||
|
||||
/obj/item/reagent_containers/glass/examine(var/mob/user)
|
||||
/obj/item/reagent_containers/glass/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
if(distance < 3)
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
. += "<span class='notice'>It contains [reagents.total_volume] units of liquid.</span>"
|
||||
else
|
||||
@@ -362,7 +362,7 @@
|
||||
QDEL_NULL(holding)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/examine(mob/user)
|
||||
/obj/item/reagent_containers/glass/bucket/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(loc == user && holding)
|
||||
. += "There is \a [holding] in \the [src]."
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/examine(mob/user)
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
. += "<span class='notice'>It is currently loaded.</span>"
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
spray_size = next_in_list(spray_size, spray_sizes)
|
||||
to_chat(user, "<span class='notice'>You adjusted the pressure nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
/obj/item/reagent_containers/spray/examine(mob/user)
|
||||
/obj/item/reagent_containers/spray/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(loc == user)
|
||||
. += "[round(reagents.total_volume)] units left."
|
||||
@@ -132,9 +132,9 @@
|
||||
. = ..()
|
||||
reagents.add_reagent("condensedcapsaicin", volume)
|
||||
|
||||
/obj/item/reagent_containers/spray/pepper/examine(mob/user)
|
||||
/obj/item/reagent_containers/spray/pepper/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
if(distance < 2)
|
||||
. += "The safety is [safety ? "on" : "off"]."
|
||||
|
||||
/obj/item/reagent_containers/spray/pepper/attack_self(var/mob/user)
|
||||
|
||||
Reference in New Issue
Block a user