From 8c0f4002ff062064b97ff11664b24ac091b100cd Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Wed, 29 May 2024 11:43:45 +0200 Subject: [PATCH] Jellypeople toxins WG & Fatness Split When jellypeople have reached the maximum blood level, any excess toxins will be turned into fatness. Jellyfolk capable of splitting can now do so using fatness (chosen first if there is both enough fatness and blood) --- code/modules/mob/living/carbon/damage_procs.dm | 5 ++++- .../mob/living/carbon/human/species_types/jellypeople.dm | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 6faa4406..27a793b5 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -91,7 +91,10 @@ if(amount > 0) blood_volume -= 3 * amount //5x was too much, this is punishing enough. else - blood_volume -= amount + if(blood_volume >= BLOOD_VOLUME_MAXIMUM) //if their blood level is already at safe amounts, turn the chemical into fatness rather than blood + adjust_fatness(-amount, FATTENING_TYPE_CHEM) + else + blood_volume -= amount return ..() /mob/living/carbon/getStaminaLoss() diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 137cca07..d2057e52 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -198,7 +198,7 @@ /datum/action/innate/split_body/IsAvailable() if(..()) var/mob/living/carbon/human/H = owner - if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT) + if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT || H.fatness_real >= BLOOD_VOLUME_SLIME_SPLIT*0.45) return 1 return 0 @@ -215,7 +215,7 @@ H.notransform = TRUE if(do_after(owner, delay=60, needhand=FALSE, target=owner, progress=TRUE)) - if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT) + if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT || H.fatness_real >= BLOOD_VOLUME_SLIME_SPLIT*0.45) make_dupe() else to_chat(H, "...but there is not enough of you to go around! You must attain more mass to split!") @@ -239,7 +239,10 @@ spare.domutcheck() spare.Move(get_step(H.loc, pick(NORTH,SOUTH,EAST,WEST))) - H.blood_volume *= 0.45 + if(H.fatness_real >= BLOOD_VOLUME_SLIME_SPLIT*0.45) + H.fatness_real -= BLOOD_VOLUME_SLIME_SPLIT*0.45 + else + H.blood_volume *= 0.45 H.notransform = 0 var/datum/species/jelly/slime/origin_datum = H.dna.species