From cd4fc1dd25bea0091f906e846cb9a2b96af534ac Mon Sep 17 00:00:00 2001 From: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com> Date: Tue, 21 May 2024 19:09:19 -0600 Subject: [PATCH] Lazarus Reagent Change, Decay Rate change, and Formaldehyde Buff (#25324) * Changes necrosis_prob to use decaylevel. * Reverts previous change to create a new branch. * Changes Lazarus Reagent to use decaylevel. * Changes decay rates while leaving the point at which they're skeletonized the same. This is to give only a 3 minute timer for lazarus instead of a 5 minute timer without any consequence. * Changes the later halves of decay rate. * Apply suggestions from code review Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com> * Update code/modules/mob/living/carbon/human/human_life.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com> --------- Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human_life.dm | 10 +++++----- code/modules/reagents/chemistry/reagents/medicine.dm | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_life.dm b/code/modules/mob/living/carbon/human/human_life.dm index b1aa99b34b0..67ac118cb07 100644 --- a/code/modules/mob/living/carbon/human/human_life.dm +++ b/code/modules/mob/living/carbon/human/human_life.dm @@ -767,19 +767,19 @@ if(reagents.has_reagent("formaldehyde")) //embalming fluid stops decay return - if(decaytime <= 6000) //10 minutes for decaylevel1 -- stinky + if(decaytime <= 8 MINUTES) return - if(decaytime > 6000 && decaytime <= 12000)//20 minutes for decaylevel2 -- bloated and very stinky + if(decaytime > 8 MINUTES) decaylevel = 1 - if(decaytime > 12000 && decaytime <= 18000)//30 minutes for decaylevel3 -- rotting and gross + if(decaytime > 16 MINUTES) decaylevel = 2 - if(decaytime > 18000 && decaytime <= 27000)//45 minutes for decaylevel4 -- skeleton + if(decaytime > 24 MINUTES) decaylevel = 3 - if(decaytime > 27000) + if(decaytime > 45 MINUTES) decaylevel = 4 makeSkeleton() return //No puking over skeletons, they don't smell at all! diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index 185f8255b2f..1215957fba8 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -923,12 +923,12 @@ M.adjustFireLoss(rand(0, 15)) if(ishuman(M)) var/mob/living/carbon/human/H = M + var/necrosis_prob = 15 * H.decaylevel H.decaylevel = 0 - var/necrosis_prob = 40 * min((20 MINUTES), max((time_dead - (1 MINUTES)), 0)) / ((20 MINUTES) - (1 MINUTES)) for(var/obj/item/organ/O in (H.bodyparts | H.internal_organs)) // Per non-vital body part: - // 0% chance of necrosis within 1 minute of death - // 40% chance of necrosis after 20 minutes of death + // 15% * H.decaylevel (1 to 4) + // Min of 0%, Max of 60% if(prob(necrosis_prob) && !O.is_robotic() && !O.vital) // side effects may include: Organ failure O.necrotize(FALSE)