Merge pull request #7489 from Citadel-Station-13/nanites

Nanites port
This commit is contained in:
deathride58
2018-09-03 13:47:28 -04:00
committed by GitHub
109 changed files with 5816 additions and 3795 deletions
+9 -6
View File
@@ -120,14 +120,17 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
var/life_status
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
var/nanite_sensors = FALSE
if(H in SSnanites.nanite_monitored_mobs)
nanite_sensors = TRUE
// Check if their z-level is correct and if they are wearing a uniform.
// Accept H.z==0 as well in case the mob is inside an object.
if ((H.z == 0 || H.z == z) && istype(H.w_uniform, /obj/item/clothing/under))
if ((H.z == 0 || H.z == z) && istype(H.w_uniform, /obj/item/clothing/under) || nanite_sensors)
U = H.w_uniform
// Are the suit sensors on?
if ((U.has_sensor > 0) && U.sensor_mode)
pos = H.z == 0 || U.sensor_mode == SENSOR_COORDS ? get_turf(H) : null
if (nanite_sensors || ((U.has_sensor > 0) && U.sensor_mode))
pos = H.z == 0 || (nanite_sensors || U.sensor_mode == SENSOR_COORDS) ? get_turf(H) : null
// Special case: If the mob is inside an object confirm the z-level on turf level.
if (H.z == 0 && (!pos || pos.z != z))
@@ -144,12 +147,12 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
assignment = ""
ijob = 80
if (U.sensor_mode >= SENSOR_LIVING)
if (nanite_sensors || U.sensor_mode >= SENSOR_LIVING)
life_status = (!H.stat ? TRUE : FALSE)
else
life_status = null
if (U.sensor_mode >= SENSOR_VITALS)
if (nanite_sensors || U.sensor_mode >= SENSOR_VITALS)
oxydam = round(H.getOxyLoss(),1)
toxdam = round(H.getToxLoss(),1)
burndam = round(H.getFireLoss(),1)
@@ -160,7 +163,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
burndam = null
brutedam = null
if (U.sensor_mode >= SENSOR_COORDS)
if (nanite_sensors || U.sensor_mode >= SENSOR_COORDS)
if (!pos)
pos = get_turf(H)
area = get_area_name(H, TRUE)