mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-23 05:06:50 +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:
@@ -36,7 +36,7 @@
|
||||
if(randomize_harvest_count)
|
||||
max_harvests = max(0, rand(min_harvests, max_harvests)) // Incase you want to weight it more toward 'not harvestable', set min_harvests to a negative value.
|
||||
|
||||
/obj/structure/flora/examine(mob/user)
|
||||
/obj/structure/flora/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(harvest_count < max_harvests)
|
||||
. += get_harvestable_desc()
|
||||
@@ -277,9 +277,9 @@
|
||||
plane = OBJ_PLANE
|
||||
var/obj/item/stored_item
|
||||
|
||||
/obj/structure/flora/pottedplant/examine(mob/user)
|
||||
/obj/structure/flora/pottedplant/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(in_range(user, src) && stored_item)
|
||||
if(distance < 2 && stored_item)
|
||||
. += "<span class='filter_notice'><i>You can see something in there...</i></span>"
|
||||
|
||||
/obj/structure/flora/pottedplant/attackby(obj/item/I, mob/user)
|
||||
|
||||
Reference in New Issue
Block a user