mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-28 23:58:31 +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:
@@ -58,9 +58,9 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
/obj/item/weldingtool/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(max_fuel && loc == user)
|
||||
if(max_fuel && distance < 2)
|
||||
. += "It contains [get_fuel()]/[src.max_fuel] units of fuel!"
|
||||
|
||||
/obj/item/weldingtool/attack(atom/A, mob/living/user, def_zone)
|
||||
@@ -557,9 +557,9 @@
|
||||
/obj/item/weldingtool/electric/get_cell()
|
||||
return power_supply
|
||||
|
||||
/obj/item/weldingtool/electric/examine(mob/user)
|
||||
/obj/item/weldingtool/electric/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
if(distance < 2)
|
||||
if(power_supply)
|
||||
. += "It [src.name] has [get_fuel()] charge left."
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user