From 0398ebd249bf5a35d32e3e12682f443cfb7ab97e Mon Sep 17 00:00:00 2001
From: SabreML <57483089+SabreML@users.noreply.github.com>
Date: Tue, 1 Dec 2020 09:27:42 +0000
Subject: [PATCH] Adds the ability to pat out fires on burning people (#15015)
* Update carbon.dm
* Heat resistance
---
code/modules/mob/living/carbon/carbon.dm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index fd1e338fa94..7d30b1266fd 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -248,6 +248,25 @@
"[M] shakes [src] trying to wake [p_them()] up!",\
"You shake [src] trying to wake [p_them()] up!",\
)
+
+ else if(on_fire)
+ var/self_message = "You try to extinguish [src]!"
+ if(prob(30) && ishuman(M)) // 30% chance of burning your hands
+ var/mob/living/carbon/human/H = M
+ var/protected = FALSE // Protected from the fire
+ if((H.gloves?.max_heat_protection_temperature > 360) || (HEATRES in H.mutations))
+ protected = TRUE
+
+ var/obj/item/organ/external/active_hand = H.get_organ("[H.hand ? "l" : "r"]_hand")
+ if(active_hand && !protected) // Wouldn't really work without a hand
+ active_hand.receive_damage(0, 5)
+ self_message = "You burn your hand trying to extinguish [src]!"
+ H.update_icons()
+
+ M.visible_message("[M] tries to extinguish [src]!", self_message)
+ playsound(get_turf(src), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ adjust_fire_stacks(-0.5)
+
// BEGIN HUGCODE - N3X
else
playsound(get_turf(src), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)