mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-22 04:36:53 +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:
@@ -169,7 +169,7 @@
|
||||
set_cached_examine_icon(src, I, 200 SECONDS)
|
||||
return I
|
||||
|
||||
/mob/observer/dead/examine(mob/user)
|
||||
/mob/observer/dead/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
|
||||
if(is_admin(user))
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
else if(prob(tipped_status * 0.2))
|
||||
playsound(src, 'sound/machines/warning-buzzer.ogg', 30, extrarange=-2)
|
||||
|
||||
/mob/living/bot/medbot/examine(mob/user)
|
||||
/mob/living/bot/medbot/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(tipped_status == MEDBOT_PANIC_NONE)
|
||||
return
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
/obj/item/mmi/digital/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
return //Doesn't do anything right now because none of the things that can be done to a regular MMI make any sense for these
|
||||
|
||||
/obj/item/mmi/digital/examine(mob/user)
|
||||
/obj/item/mmi/digital/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
|
||||
if(src.brainmob && src.brainmob.key)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/mob/living/carbon/human/examine(mob/user)
|
||||
/mob/living/carbon/human/examine(mob/user, distance, infix, suffix)
|
||||
// . = ..() //Note that we don't call parent. We build the list by ourselves.
|
||||
|
||||
var/skip_gear = 0
|
||||
var/skip_body = 0
|
||||
|
||||
if(alpha <= EFFECTIVE_INVIS)
|
||||
return src.loc.examine(user) // Returns messages as if they examined wherever the human was
|
||||
return loc.examine(user, distance, infix, suffix) // Returns messages as if they examined wherever the human was
|
||||
|
||||
var/looks_synth = looksSynthetic()
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ var/global/const/MAX_ACTIVE_TIME = 400
|
||||
if(!config.aliens_allowed)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/clothing/mask/facehugger/examine(mob/user)
|
||||
/obj/item/clothing/mask/facehugger/examine(mob/user, distance, infix, suffix)
|
||||
..(user)
|
||||
switch(stat)
|
||||
if(DEAD,UNCONSCIOUS)
|
||||
@@ -217,4 +217,4 @@ var/global/const/MAX_ACTIVE_TIME = 400
|
||||
if(H.head && (H.head.body_parts_covered & FACE) && !(H.head.item_flags & FLEXIBLEMATERIAL))
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/silicon/ai/examine(mob/user)
|
||||
/mob/living/silicon/ai/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
|
||||
if (src.stat == DEAD)
|
||||
@@ -29,10 +29,10 @@
|
||||
. += "The wireless networking light is blinking."
|
||||
|
||||
. += "*---------*"
|
||||
|
||||
|
||||
if(hardware && (hardware.owner == src))
|
||||
. += hardware.get_examine_desc()
|
||||
|
||||
|
||||
user.showLaws(src)
|
||||
|
||||
/mob/proc/showLaws(var/mob/living/silicon/S)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/silicon/pai/examine(mob/user)
|
||||
. = ..(user, infix = ", personal AI")
|
||||
/mob/living/silicon/pai/examine(mob/user, distance, infix, suffix)
|
||||
. = ..(user, distance, ", personal AI", suffix)
|
||||
|
||||
switch(src.stat)
|
||||
if(CONSCIOUS)
|
||||
@@ -15,4 +15,3 @@
|
||||
if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!]
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
. += "<br>It is [pose]" //Extra <br> intentional
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
var/force_holder = null //
|
||||
|
||||
/obj/item/gripper/examine(mob/user)
|
||||
/obj/item/gripper/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(wrapped)
|
||||
. += "<span class='notice'>\The [src] is holding \the [wrapped].</span>"
|
||||
. += wrapped.examine(user)
|
||||
. += wrapped.examine(user, distance, infix, suffix)
|
||||
|
||||
/obj/item/gripper/CtrlClick(mob/user)
|
||||
drop_item()
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(drone_progress >= 100)
|
||||
visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.")
|
||||
|
||||
/obj/machinery/drone_fabricator/examine(mob/user)
|
||||
/obj/machinery/drone_fabricator/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
|
||||
. += "<br><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/silicon/robot/examine(mob/user)
|
||||
var/custom_infix = custom_name ? ", [modtype] [braintype]" : ""
|
||||
. = ..(user, infix = custom_infix)
|
||||
/mob/living/silicon/robot/examine(mob/user, distance, infix, suffix)
|
||||
var/custom_infix = custom_name ? ", [modtype] [braintype]" : infix
|
||||
. = ..(user, distance, custom_infix, suffix)
|
||||
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 75)
|
||||
|
||||
@@ -433,7 +433,7 @@
|
||||
max_walls = 10
|
||||
max_doors = 5
|
||||
|
||||
/obj/item/inflatable_dispenser/examine(var/mob/user)
|
||||
/obj/item/inflatable_dispenser/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
. += "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored."
|
||||
. += "It is set to deploy [mode ? "doors" : "walls"]"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
recharging = null
|
||||
. = ..()
|
||||
|
||||
/mob/living/silicon/robot/platform/examine(mob/user, distance)
|
||||
/mob/living/silicon/robot/platform/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(distance <= 3)
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
// Associative list of paths and their chances. path = straws in the lot
|
||||
var/list/harvest_results
|
||||
|
||||
/mob/living/simple_mob/examine(mob/user)
|
||||
/mob/living/simple_mob/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
|
||||
if(user && (isobserver(user) || get_dist(user, src) <= 3))
|
||||
if(user && (isobserver(user) || distance <= 3))
|
||||
|
||||
var/datum/gender/G = gender_datums[get_visible_gender()]
|
||||
if(stat == DEAD)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
to_chat(src, span("warning", "\The [user] takes your [my_headset.name] away! How cruel!"))
|
||||
my_headset = null
|
||||
|
||||
/mob/living/simple_mob/animal/passive/bird/parrot/examine(mob/user)
|
||||
/mob/living/simple_mob/animal/passive/bird/parrot/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(my_headset)
|
||||
. += "It is wearing \a [my_headset]."
|
||||
@@ -250,4 +250,4 @@
|
||||
if(holder.stat || !holder.say_list || !message || speaker == holder)
|
||||
return
|
||||
var/datum/say_list/S = holder.say_list
|
||||
S.speak |= message
|
||||
S.speak |= message
|
||||
|
||||
@@ -163,7 +163,7 @@ You can eat glowing tree fruit to fuel your <b>ranged spitting attack</b> and <b
|
||||
reset_charisma()
|
||||
|
||||
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/examine(mob/living/user)
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if (istype(user, /mob/living/simple_mob/animal/sif/grafadreka) || isobserver(user))
|
||||
var/datum/gender/G = gender_datums[get_visible_gender()]
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// caps the amount drakes can heal with their sap wound tending interaction.
|
||||
sap_heal_threshold = min(sap_heal_threshold, (round(health / getMaxHealth() / scarification_period)+1) * scarification_period)
|
||||
|
||||
/mob/living/simple_mob/animal/sif/examine(mob/user)
|
||||
/mob/living/simple_mob/animal/sif/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(stat != DEAD)
|
||||
var/scarification = 1-sap_heal_threshold
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
// Because we can't perfectly duplicate some examine() output, we directly examine the AM it is copying. It's messy but
|
||||
// this is to prevent easy checks from the opposing force.
|
||||
/mob/living/simple_mob/illusion/examine(mob/user)
|
||||
/mob/living/simple_mob/illusion/examine(mob/user, distance, infix, suffix)
|
||||
if(copying)
|
||||
return copying.examine(user)
|
||||
return copying.examine(user, distance, infix, suffix)
|
||||
else
|
||||
return list("???")
|
||||
|
||||
@@ -113,4 +113,4 @@
|
||||
|
||||
/mob/living/simple_mob/illusion/get_catalogue_delay()
|
||||
if(copying)
|
||||
return copying.get_catalogue_delay()
|
||||
return copying.get_catalogue_delay()
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/construct/examine(mob/user)
|
||||
/mob/living/simple_mob/construct/examine(mob/user, distance, infix, suffix)
|
||||
. = ..(user)
|
||||
var/max = getMaxHealth()
|
||||
if (health < max)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/simple_mob/slime/xenobio/examine(mob/user)
|
||||
/mob/living/simple_mob/slime/xenobio/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(hat)
|
||||
. += "It is wearing \a [hat]."
|
||||
|
||||
Reference in New Issue
Block a user