diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 9c8635afa9e..8168ec1c15f 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1593,6 +1593,9 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
return
..()
+#define CPR_CHEST_COMPRESSION_ONLY 0.75
+#define CPR_RESCUE_BREATHS 1
+
/mob/living/carbon/human/proc/do_cpr(mob/living/carbon/human/H)
if(H == src)
to_chat(src, "You cannot perform CPR on yourself!")
@@ -1600,26 +1603,19 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_FAKEDEATH))
to_chat(src, "[H.name] is dead!")
return
- if(!check_has_mouth())
- to_chat(src, "You don't have a mouth, you cannot perform CPR!")
- return
- if(!H.check_has_mouth())
- to_chat(src, "They don't have a mouth, you cannot perform CPR!")
- return
- if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted))
- to_chat(src, "Remove your mask first!")
- return
- if((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH) && !H.wear_mask.mask_adjusted))
- to_chat(src, "Remove [H.p_their()] mask first!")
- return
if(H.receiving_cpr) // To prevent spam stacking
to_chat(src, "They are already receiving CPR!")
return
- visible_message("[src] is trying to perform CPR on [H.name]!", "You try to perform CPR on [H.name]!")
H.receiving_cpr = TRUE
+ var/cpr_modifier = get_cpr_mod(H)
+ if(cpr_modifier == CPR_RESCUE_BREATHS)
+ visible_message("[src] is trying to perform chest compressions and rescue breaths on [H.name]!", "You try to perform chest compressions and rescue breaths on [H.name]!")
+ else
+ visible_message("[src] is trying to perform chest compressions on [H.name]!", "You try to perform chest compressions on [H.name]!")
+
if(do_mob(src, H, 40))
if(H.health <= HEALTH_THRESHOLD_CRIT)
- H.adjustOxyLoss(-15)
+ H.adjustOxyLoss(-15 * cpr_modifier)
H.SetLoseBreath(0)
H.AdjustParalysis(-1)
H.updatehealth("cpr")
@@ -1633,6 +1629,15 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
H.receiving_cpr = FALSE
to_chat(src, "You need to stay still while performing CPR!")
+/mob/living/carbon/human/proc/get_cpr_mod(mob/living/carbon/human/H)
+ if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted))
+ return CPR_CHEST_COMPRESSION_ONLY
+ if((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH) && !H.wear_mask.mask_adjusted))
+ return CPR_CHEST_COMPRESSION_ONLY
+ if(!H.check_has_mouth() || !check_has_mouth())
+ return CPR_CHEST_COMPRESSION_ONLY
+ return CPR_RESCUE_BREATHS
+
/mob/living/carbon/human/canBeHandcuffed()
if(get_num_arms() >= 2)
return TRUE