From 03f4a81f16bdde264d72437e7f3b3f9a9c4e75bf Mon Sep 17 00:00:00 2001
From: skoglol <33292112+kriskog@users.noreply.github.com>
Date: Mon, 20 Jan 2020 00:32:38 +0100
Subject: [PATCH] Makes husking harder, adds husk healing to instabitaluri
(#48717)
* Makes husking harder, adds husk healing to isntabitaluri
* Adds amount limit to instab unhusking, removes roundstart.
* treshold define, upped instab limit, nice feedback
---
_maps/map_files/BoxStation/BoxStation.dmm | 1 -
_maps/map_files/Donutstation/Donutstation.dmm | 1 -
_maps/map_files/MetaStation/MetaStation.dmm | 1 -
_maps/map_files/PubbyStation/PubbyStation.dmm | 1 -
_maps/shuttles/whiteship_box.dmm | 1 -
code/__DEFINES/reagents.dm | 2 ++
code/modules/mob/living/carbon/carbon.dm | 2 +-
.../reagents/chemistry/reagents/cat2_medicine_reagents.dm | 4 ++++
code/modules/reagents/chemistry/reagents/medicine_reagents.dm | 2 +-
9 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm
index 46d4c0e27e6..7527c5ec8fc 100644
--- a/_maps/map_files/BoxStation/BoxStation.dmm
+++ b/_maps/map_files/BoxStation/BoxStation.dmm
@@ -49775,7 +49775,6 @@
/area/space/nearstation)
"gZG" = (
/obj/structure/closet/crate/freezer/surplus_limbs,
-/obj/item/reagent_containers/glass/beaker/instabitaluri,
/turf/open/floor/plasteel/white/side{
dir = 8
},
diff --git a/_maps/map_files/Donutstation/Donutstation.dmm b/_maps/map_files/Donutstation/Donutstation.dmm
index 514f10d783a..89c3c8964d3 100644
--- a/_maps/map_files/Donutstation/Donutstation.dmm
+++ b/_maps/map_files/Donutstation/Donutstation.dmm
@@ -13245,7 +13245,6 @@
/area/medical/surgery)
"aKl" = (
/obj/structure/closet/crate/freezer/surplus_limbs,
-/obj/item/reagent_containers/glass/beaker/instabitaluri,
/turf/open/floor/plasteel/white/side{
dir = 8
},
diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm
index 052ce43efac..a048ab42f95 100644
--- a/_maps/map_files/MetaStation/MetaStation.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.dmm
@@ -45643,7 +45643,6 @@
dir = 4
},
/obj/structure/closet/crate/freezer/surplus_limbs,
-/obj/item/reagent_containers/glass/beaker/instabitaluri,
/turf/open/floor/plasteel/white,
/area/medical/storage)
"bYY" = (
diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm
index 31085410f19..4d88e768488 100644
--- a/_maps/map_files/PubbyStation/PubbyStation.dmm
+++ b/_maps/map_files/PubbyStation/PubbyStation.dmm
@@ -34200,7 +34200,6 @@
/area/medical/medbay/central)
"bHb" = (
/obj/structure/closet/crate/freezer/surplus_limbs,
-/obj/item/reagent_containers/glass/beaker/instabitaluri,
/obj/machinery/newscaster/security_unit{
pixel_y = 32
},
diff --git a/_maps/shuttles/whiteship_box.dmm b/_maps/shuttles/whiteship_box.dmm
index d3c364df8a3..4122bdd4a00 100644
--- a/_maps/shuttles/whiteship_box.dmm
+++ b/_maps/shuttles/whiteship_box.dmm
@@ -87,7 +87,6 @@
"am" = (
/obj/effect/decal/cleanable/dirt/dust,
/obj/structure/closet/crate/freezer/surplus_limbs,
-/obj/item/reagent_containers/glass/beaker/instabitaluri,
/obj/effect/turf_decal/bot,
/turf/open/floor/plasteel,
/area/shuttle/abandoned/medbay)
diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm
index 18b41f0a058..1255eccf19e 100644
--- a/code/__DEFINES/reagents.dm
+++ b/code/__DEFINES/reagents.dm
@@ -31,6 +31,8 @@
#define REACT_REAGENTS 5 // a reaction occured
#define MIMEDRINK_SILENCE_DURATION 30 //ends up being 60 seconds given 1 tick every 2 seconds
+#define TRESHOLD_UNHUSK 50 //Health treshold for instabitaluri and rezadone to unhusk someone
+
//used by chem masters and pill presses
#define PILL_STYLE_COUNT 22 //Update this if you add more pill icons or you die
#define RANDOM_PILL_STYLE 22 //Dont change this one though
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 3cbf52e9779..a9d8709a39a 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -517,7 +517,7 @@
staminaloss = round(total_stamina, DAMAGE_PRECISION)
update_stat()
update_mobility()
- if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD )
+ if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD*2) && stat == DEAD )
become_husk("burn")
med_hud_set_health()
diff --git a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
index 4fc4fca9bf2..3999f3bb892 100644
--- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
@@ -341,6 +341,10 @@
if(show_message)
to_chat(Carbies, "You feel your burns and bruises healing! It stings like hell!")
SEND_SIGNAL(Carbies, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
+ //Has to be at less than TRESHOLD_UNHUSK burn damage and have 100 isntabitaluri before unhusking. Corpses dont metabolize.
+ if(HAS_TRAIT_FROM(M, TRAIT_HUSK, "burn") && Carbies.getFireLoss() < TRESHOLD_UNHUSK && Carbies.reagents.has_reagent(/datum/reagent/medicine/C2/instabitaluri, 100))
+ Carbies.cure_husk("burn")
+ Carbies.visible_message("You successfully replace most of the burnt off flesh of [Carbies].")
..()
return TRUE
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 5a63870178e..b655a55bc91 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -203,7 +203,7 @@
. = ..()
if(iscarbon(M))
var/mob/living/carbon/patient = M
- if(reac_volume >= 5 && HAS_TRAIT_FROM(patient, TRAIT_HUSK, "burn") && patient.getFireLoss() < 50) //One carp yields 12u rezadone.
+ if(reac_volume >= 5 && HAS_TRAIT_FROM(patient, TRAIT_HUSK, "burn") && patient.getFireLoss() < TRESHOLD_UNHUSK) //One carp yields 12u rezadone.
patient.cure_husk("burn")
patient.visible_message("[patient]'s body rapidly absorbs moisture from the enviroment, taking on a more healthy appearance.")