When jumpsuits take severe damage, their suit sensors break.

This commit is contained in:
CitadelStationBot
2017-04-27 02:32:35 -05:00
parent e7df2bc14a
commit b45d053ac6
11 changed files with 80 additions and 30 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
if(!istype(H)) return 0
var/obj/item/clothing/under/U = H.w_uniform
if(!istype(U)) return 0
if(U.sensor_mode <= 2) return 0
if(U.sensor_mode <= SENSOR_VITALS) return 0
return 1
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
+5 -5
View File
@@ -153,8 +153,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
U = H.w_uniform
// Are the suit sensors on?
if (U.has_sensor && U.sensor_mode)
pos = H.z == 0 || U.sensor_mode == 3 ? get_turf(H) : null
if ((U.has_sensor > 0) && U.sensor_mode)
pos = H.z == 0 || 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)) continue
@@ -170,10 +170,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
assignment = ""
ijob = 80
if (U.sensor_mode >= 1) life_status = (!H.stat ? "true" : "false")
if (U.sensor_mode >= SENSOR_LIVING) life_status = (!H.stat ? "true" : "false")
else life_status = null
if (U.sensor_mode >= 2)
if (U.sensor_mode >= SENSOR_VITALS)
dam1 = round(H.getOxyLoss(),1)
dam2 = round(H.getToxLoss(),1)
dam3 = round(H.getFireLoss(),1)
@@ -184,7 +184,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
dam3 = null
dam4 = null
if (U.sensor_mode >= 3)
if (U.sensor_mode >= SENSOR_COORDS)
if (!pos) pos = get_turf(H)
var/area/player_area = get_area(H)