New bodyscanner UI fixes (#8200)

This commit is contained in:
mikomyazaki
2020-02-09 19:58:31 +01:00
committed by GitHub
parent a99861890a
commit 7150e6c4b0
11 changed files with 108 additions and 51 deletions
+20 -18
View File
@@ -1880,36 +1880,38 @@
//Works out blood pressure alert level -- not very accurate
/mob/living/carbon/human/proc/get_blood_pressure_alert()
var/list/bp = blood_pressure()
var/systolic_alert
var/diastolic_alert
// For a blood pressure, e.g. 120/80
var/systolic_alert // this is the top number '120' -- highest pressure when heart beats
var/diastolic_alert // this is the bottom number '80' -- lowest pressure when heart relaxes
switch(bp[1])
if(BP_HIGH_SYSTOLIC to INFINITY)
systolic_alert = 4
systolic_alert = BLOOD_PRESSURE_HIGH
if(BP_PRE_HIGH_SYSTOLIC to BP_HIGH_SYSTOLIC)
systolic_alert = 3
systolic_alert = BLOOD_PRESSURE_PRE_HIGH
if(BP_IDEAL_SYSTOLIC to BP_PRE_HIGH_SYSTOLIC)
systolic_alert = 2
systolic_alert = BLOOD_PRESSURE_IDEAL
if(-INFINITY to BP_IDEAL_SYSTOLIC)
systolic_alert = 1
systolic_alert = BLOOD_PRESSURE_LOW
switch(bp[2])
if(BP_HIGH_DIASTOLIC to INFINITY)
diastolic_alert = 4
diastolic_alert = BLOOD_PRESSURE_HIGH
if(BP_PRE_HIGH_DIASTOLIC to BP_HIGH_DIASTOLIC)
diastolic_alert = 3
diastolic_alert = BLOOD_PRESSURE_PRE_HIGH
if(BP_IDEAL_DIASTOLIC to BP_PRE_HIGH_DIASTOLIC)
diastolic_alert = 2
diastolic_alert = BLOOD_PRESSURE_IDEAL
if(-INFINITY to BP_IDEAL_DIASTOLIC)
diastolic_alert = 1
if(systolic_alert == 4 || diastolic_alert == 4)
return 4
if(systolic_alert == 3 || diastolic_alert == 3)
return 3
if(systolic_alert == 1 || diastolic_alert == 1)
return 1
if(systolic_alert <= 2 && diastolic_alert <= 2)
return 2
diastolic_alert = BLOOD_PRESSURE_LOW
if(systolic_alert == BLOOD_PRESSURE_HIGH || diastolic_alert == BLOOD_PRESSURE_HIGH)
return BLOOD_PRESSURE_HIGH
if(systolic_alert == BLOOD_PRESSURE_PRE_HIGH || diastolic_alert == BLOOD_PRESSURE_PRE_HIGH)
return BLOOD_PRESSURE_PRE_HIGH
if(systolic_alert == BLOOD_PRESSURE_LOW || diastolic_alert == BLOOD_PRESSURE_LOW)
return BLOOD_PRESSURE_LOW
if(systolic_alert <= BLOOD_PRESSURE_IDEAL && diastolic_alert <= BLOOD_PRESSURE_IDEAL)
return BLOOD_PRESSURE_IDEAL
//Point at which you dun breathe no more. Separate from asystole crit, which is heart-related.
/mob/living/carbon/human/nervous_system_failure()