mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Crew pinpointer/lifeline program can track mob has monitor nanite, also fix mob has same name overwriting each others in lifeline app (#16388)
* ah bnya * oop
This commit is contained in:
@@ -243,23 +243,30 @@
|
||||
var/obj/item/card/id/ID = humanoid.wear_id.GetID()
|
||||
if(ID && ID.registered_name)
|
||||
crewmember_name = ID.registered_name
|
||||
names += crewmember_name
|
||||
humanoids[crewmember_name] = i
|
||||
while(crewmember_name in humanoids)
|
||||
humanoids[crewmember_name]++
|
||||
crewmember_name = text("[] ([])", crewmember_name, humanoids[crewmember_name])
|
||||
names[crewmember_name] = humanoid
|
||||
humanoids[crewmember_name] = 1
|
||||
for(var/N in sortList(names))
|
||||
var/list/crewinfo = list(
|
||||
ref = REF(humanoids[N]),
|
||||
ref = REF(names[N]),
|
||||
name = N
|
||||
)
|
||||
objects += list(crewinfo)
|
||||
|
||||
/datum/computer_file/program/radar/lifeline/trackable(mob/living/carbon/human/humanoid)
|
||||
var/nanite_sensors = FALSE
|
||||
if(humanoid in SSnanites.nanite_monitored_mobs)
|
||||
nanite_sensors = TRUE
|
||||
if(!humanoid || !istype(humanoid))
|
||||
return FALSE
|
||||
if(..() && istype(humanoid.w_uniform, /obj/item/clothing/under))
|
||||
if(..() && (istype(humanoid.w_uniform, /obj/item/clothing/under) || nanite_sensors))
|
||||
if(!nanite_sensors)
|
||||
|
||||
var/obj/item/clothing/under/uniform = humanoid.w_uniform
|
||||
if(!uniform.has_sensor || (uniform.sensor_mode < SENSOR_COORDS)) // Suit sensors must be on maximum.
|
||||
return FALSE
|
||||
var/obj/item/clothing/under/uniform = humanoid.w_uniform
|
||||
if(!uniform.has_sensor || (uniform.sensor_mode < SENSOR_COORDS)) // Suit sensors must be on maximum.
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -332,6 +339,8 @@
|
||||
return
|
||||
next_scan = world.time + (2 SECONDS)
|
||||
objects = list()
|
||||
var/list/names = list()
|
||||
var/list/humanoids = list()
|
||||
for(var/obj/item/implant/imp in GLOB.tracked_implants)
|
||||
var/mob/living/target = imp.imp_in
|
||||
if(!istype(target))
|
||||
@@ -345,9 +354,15 @@
|
||||
var/obj/item/card/id/ID = humanoid.wear_id.GetID()
|
||||
if(ID && ID.registered_name)
|
||||
crewmember_name = ID.registered_name
|
||||
while(crewmember_name in humanoids)
|
||||
humanoids[crewmember_name]++
|
||||
crewmember_name = text("[] ([])", crewmember_name, humanoids[crewmember_name])
|
||||
names[crewmember_name] = humanoid
|
||||
humanoids[crewmember_name] = 1
|
||||
for(var/N in sortList(names))
|
||||
var/list/crewinfo = list(
|
||||
ref = REF(target),
|
||||
name = crewmember_name,
|
||||
ref = REF(names[N]),
|
||||
name = N
|
||||
)
|
||||
objects += list(crewinfo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user