Skip to content

Commit

Permalink
[MIRROR] Cleans up blood deficiency hardcoding (#1605)
Browse files Browse the repository at this point in the history
* Cleans up blood deficiency hardcoding

* Modular

* No mail goodies

---------

Co-authored-by: MrMelbert <[email protected]>
Co-authored-by: Mal <[email protected]>
Co-authored-by: SomeRandomOwl <[email protected]>
  • Loading branch information
4 people authored and StealsThePRs committed Mar 27, 2024
1 parent 120381a commit bb7337c
Show file tree
Hide file tree
Showing 15 changed files with 147 additions and 196 deletions.
9 changes: 9 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,12 @@

///from /atom/movable/screen/alert/give/proc/handle_transfer(): (taker, item)
#define COMSIG_CARBON_ITEM_GIVEN "carbon_item_given"

/// Sent from /mob/living/carbon/human/handle_blood(): (seconds_per_tick, times_fired)
#define COMSIG_HUMAN_ON_HANDLE_BLOOD "human_on_handle_blood"
/// Return to prevent all default blood handling
#define HANDLE_BLOOD_HANDLED (1<<0)
/// Return to skip default nutrition -> blood conversion
#define HANDLE_BLOOD_NO_NUTRITION_DRAIN (1<<1)
/// Return to skip oxyloss and similar effecst from blood level
#define HANDLE_BLOOD_NO_EFFECTS (1<<2)
1 change: 0 additions & 1 deletion code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// This object innately spawns with fantasy variables already applied (the magical component is given to it on initialize), and thus we never want to give it the component again.
#define TRAIT_INNATELY_FANTASTICAL_ITEM "innately_fantastical_item"
#define TRAIT_DEPRESSION "depression"
#define TRAIT_BLOOD_DEFICIENCY "blood_deficiency"
#define TRAIT_JOLLY "jolly"
#define TRAIT_NOCRITDAMAGE "no_crit"
/// Prevents shovies and some strong blows such as unarmed punches and (unreliably) tackles the owner down
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BLOODSHOT_EYES" = TRAIT_BLOODSHOT_EYES,
"TRAIT_BLOODY_MESS" = TRAIT_BLOODY_MESS,
"TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS,
"TRAIT_BLOOD_DEFICIENCY" = TRAIT_BLOOD_DEFICIENCY,
"TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE,
"TRAIT_BONSAI" = TRAIT_BONSAI,
"TRAIT_BOOZE_SLIDER" = TRAIT_BOOZE_SLIDER,
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_BALD" = TRAIT_BALD,
"TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE,
"TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS,
"TRAIT_BLOOD_DEFICIENCY" = TRAIT_BLOOD_DEFICIENCY,
"TRAIT_BLOODSHOT_EYES" = TRAIT_BLOODSHOT_EYES,
"TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE,
"TRAIT_BONSAI" = TRAIT_BONSAI,
Expand Down
6 changes: 3 additions & 3 deletions code/datums/quirks/_quirk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
var/abstract_parent_type = /datum/quirk
/// The icon to show in the preferences menu.
/// This references a tgui icon, so it can be FontAwesome or a tgfont (with a tg- prefix).
var/icon = "bug" //NOVA EDIT CHANGE
/// A list of items people can receive from mail who have this quirk enabled
var/icon = "bug" //NOVA EDIT CHANGE - ORIGINAL: var/icon
/// A lazylist of items people can receive from mail who have this quirk enabled
/// The base weight for the each quirk's mail goodies list to be selected is 5
/// then the item selected is determined by pick(selected_quirk.mail_goodies)
var/mail_goodies = list()
var/list/mail_goodies

/datum/quirk/Destroy()
if(quirk_holder)
Expand Down
57 changes: 35 additions & 22 deletions code/datums/quirks/negative_quirks/blood_deficiency.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,50 @@
desc = "Your body can't produce enough blood to sustain itself."
icon = FA_ICON_TINT
value = -8
mob_trait = TRAIT_BLOOD_DEFICIENCY
gain_text = span_danger("You feel your vigor slowly fading away.")
lose_text = span_notice("You feel vigorous again.")
medical_record_text = "Patient requires regular treatment for blood loss due to low production of blood."
hardcore_value = 8
mail_goodies = list(/obj/item/reagent_containers/blood/o_minus) // universal blood type that is safe for all
/// Minimum amount of blood the paint is set to
var/min_blood = BLOOD_VOLUME_SAFE - 25 // just barely survivable without treatment

/datum/quirk/blooddeficiency/post_add()
if(!ishuman(quirk_holder))
return
/datum/quirk/blooddeficiency/add(client/client_source)
RegisterSignal(quirk_holder, COMSIG_HUMAN_ON_HANDLE_BLOOD, PROC_REF(lose_blood))
RegisterSignal(quirk_holder, COMSIG_SPECIES_GAIN, PROC_REF(update_mail))

// for making sure the roundstart species has the right blood pack sent to them
var/mob/living/carbon/human/carbon_target = quirk_holder
carbon_target.dna.species.update_quirk_mail_goodies(carbon_target, src)

/**
* Makes the mob lose blood from having the blood deficiency quirk, if possible
*
* Arguments:
* * seconds_per_tick
*/
/datum/quirk/blooddeficiency/proc/lose_blood(seconds_per_tick)
if(quirk_holder.stat == DEAD)
return
var/mob/living/carbon/human/human_holder = quirk_holder
update_mail(new_species = human_holder.dna.species)

/datum/quirk/blooddeficiency/remove()
UnregisterSignal(quirk_holder, list(COMSIG_HUMAN_ON_HANDLE_BLOOD, COMSIG_SPECIES_GAIN))

var/mob/living/carbon/human/carbon_target = quirk_holder
if(HAS_TRAIT(carbon_target, TRAIT_NOBLOOD) && isnull(carbon_target.dna.species.exotic_blood)) //can't lose blood if your species doesn't have any
/datum/quirk/blooddeficiency/proc/lose_blood(datum/source, seconds_per_tick, times_fired)
SIGNAL_HANDLER

var/mob/living/carbon/human/human_holder = quirk_holder
if(human_holder.stat == DEAD || human_holder.blood_volume <= min_blood)
return
// This exotic blood check is solely to snowflake slimepeople into working with this quirk
if(HAS_TRAIT(quirk_holder, TRAIT_NOBLOOD) && isnull(human_holder.dna.species.exotic_blood))
return

if (carbon_target.blood_volume <= min_blood)
human_holder.blood_volume = max(min_blood, human_holder.blood_volume - human_holder.dna.species.blood_deficiency_drain_rate * seconds_per_tick)

/datum/quirk/blooddeficiency/proc/update_mail(datum/source, datum/species/new_species, datum/species/old_species)
SIGNAL_HANDLER

mail_goodies.Cut()

if(isnull(new_species.exotic_blood) && isnull(new_species.exotic_bloodtype))
if(TRAIT_NOBLOOD in new_species.inherent_traits)
return

mail_goodies += /obj/item/reagent_containers/blood/o_minus
return
// Ensures that we don't reduce total blood volume below min_blood.
carbon_target.blood_volume = max(min_blood, carbon_target.blood_volume - carbon_target.dna.species.blood_deficiency_drain_rate * seconds_per_tick)

for(var/obj/item/reagent_containers/blood/blood_bag as anything in typesof(/obj/item/reagent_containers/blood))
var/right_blood_type = !isnull(new_species.exotic_bloodtype) && initial(blood_bag.blood_type) == new_species.exotic_bloodtype
var/right_blood_reagent = !isnull(new_species.exotic_blood) && initial(blood_bag.unique_blood) == new_species.exotic_blood
if(right_blood_type || right_blood_reagent)
mail_goodies += blood_bag
102 changes: 44 additions & 58 deletions code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,56 @@

// Takes care blood loss and regeneration
/mob/living/carbon/human/handle_blood(seconds_per_tick, times_fired)

if(HAS_TRAIT(src, TRAIT_NOBLOOD) || (HAS_TRAIT(src, TRAIT_FAKEDEATH)))
// Under these circumstances blood handling is not necessary
if(bodytemperature < BLOOD_STOP_TEMP || HAS_TRAIT(src, TRAIT_FAKEDEATH) || HAS_TRAIT(src, TRAIT_HUSK))
return

if(bodytemperature < BLOOD_STOP_TEMP || (HAS_TRAIT(src, TRAIT_HUSK))) //cold or husked people do not pump the blood.
// Run the signal, still allowing mobs with noblood to "handle blood" in their own way
var/sigreturn = SEND_SIGNAL(src, COMSIG_HUMAN_ON_HANDLE_BLOOD, seconds_per_tick, times_fired)
if((sigreturn & HANDLE_BLOOD_HANDLED) || HAS_TRAIT(src, TRAIT_NOBLOOD))
return

//Blood regeneration if there is some space
if(blood_volume < BLOOD_VOLUME_NORMAL && !HAS_TRAIT(src, TRAIT_NOHUNGER))
var/nutrition_ratio = 0
switch(nutrition)
if(0 to NUTRITION_LEVEL_STARVING)
nutrition_ratio = 0.2
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
nutrition_ratio = 0.4
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
nutrition_ratio = 0.6
if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
nutrition_ratio = 0.8
else
nutrition_ratio = 1
if(satiety > 80)
nutrition_ratio *= 1.25
adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR * seconds_per_tick)
blood_volume = min(blood_volume + (BLOOD_REGEN_FACTOR * nutrition_ratio * seconds_per_tick), BLOOD_VOLUME_NORMAL)

// we call lose_blood() here rather than quirk/process() to make sure that the blood loss happens in sync with life()
if(HAS_TRAIT(src, TRAIT_BLOOD_DEFICIENCY))
var/datum/quirk/blooddeficiency/blooddeficiency = get_quirk(/datum/quirk/blooddeficiency)
if(!isnull(blooddeficiency))
blooddeficiency.lose_blood(seconds_per_tick)
if(!(sigreturn & HANDLE_BLOOD_NO_NUTRITION_DRAIN))
if(blood_volume < BLOOD_VOLUME_NORMAL && !HAS_TRAIT(src, TRAIT_NOHUNGER))
var/nutrition_ratio = round(nutrition / NUTRITION_LEVEL_WELL_FED, 0.2)
if(satiety > 80)
nutrition_ratio *= 1.25
adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR * seconds_per_tick)
blood_volume = min(blood_volume + (BLOOD_REGEN_FACTOR * nutrition_ratio * seconds_per_tick), BLOOD_VOLUME_NORMAL)

//Effects of bloodloss
var/word = pick("dizzy","woozy","faint")
switch(blood_volume)
if(BLOOD_VOLUME_MAX_LETHAL to INFINITY)
if(SPT_PROB(7.5, seconds_per_tick))
to_chat(src, span_userdanger("Blood starts to tear your skin apart. You're going to burst!"))
investigate_log("has been gibbed by having too much blood.", INVESTIGATE_DEATHS)
inflate_gib()
if(BLOOD_VOLUME_EXCESS to BLOOD_VOLUME_MAX_LETHAL)
if(SPT_PROB(5, seconds_per_tick))
to_chat(src, span_warning("You feel your skin swelling."))
if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
if(SPT_PROB(5, seconds_per_tick))
to_chat(src, span_warning("You feel terribly bloated."))
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(SPT_PROB(2.5, seconds_per_tick))
to_chat(src, span_warning("You feel [word]."))
adjustOxyLoss(round(0.005 * (BLOOD_VOLUME_NORMAL - blood_volume) * seconds_per_tick, 1))
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
adjustOxyLoss(round(0.01 * (BLOOD_VOLUME_NORMAL - blood_volume) * seconds_per_tick, 1))
if(SPT_PROB(2.5, seconds_per_tick))
set_eye_blur_if_lower(12 SECONDS)
to_chat(src, span_warning("You feel very [word]."))
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
adjustOxyLoss(2.5 * seconds_per_tick)
if(SPT_PROB(7.5, seconds_per_tick))
Unconscious(rand(20,60))
to_chat(src, span_warning("You feel extremely [word]."))
if(-INFINITY to BLOOD_VOLUME_SURVIVE)
if(!HAS_TRAIT(src, TRAIT_NODEATH))
investigate_log("has died of bloodloss.", INVESTIGATE_DEATHS)
death()
if(!(sigreturn & HANDLE_BLOOD_NO_EFFECTS))
var/word = pick("dizzy","woozy","faint")
switch(blood_volume)
if(BLOOD_VOLUME_MAX_LETHAL to INFINITY)
if(SPT_PROB(7.5, seconds_per_tick))
to_chat(src, span_userdanger("Blood starts to tear your skin apart. You're going to burst!"))
investigate_log("has been gibbed by having too much blood.", INVESTIGATE_DEATHS)
inflate_gib()
if(BLOOD_VOLUME_EXCESS to BLOOD_VOLUME_MAX_LETHAL)
if(SPT_PROB(5, seconds_per_tick))
to_chat(src, span_warning("You feel your skin swelling."))
if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
if(SPT_PROB(5, seconds_per_tick))
to_chat(src, span_warning("You feel terribly bloated."))
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(SPT_PROB(2.5, seconds_per_tick))
to_chat(src, span_warning("You feel [word]."))
adjustOxyLoss(round(0.005 * (BLOOD_VOLUME_NORMAL - blood_volume) * seconds_per_tick, 1))
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
adjustOxyLoss(round(0.01 * (BLOOD_VOLUME_NORMAL - blood_volume) * seconds_per_tick, 1))
if(SPT_PROB(2.5, seconds_per_tick))
set_eye_blur_if_lower(12 SECONDS)
to_chat(src, span_warning("You feel very [word]."))
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
adjustOxyLoss(2.5 * seconds_per_tick)
if(SPT_PROB(7.5, seconds_per_tick))
Unconscious(rand(20,60))
to_chat(src, span_warning("You feel extremely [word]."))
if(-INFINITY to BLOOD_VOLUME_SURVIVE)
if(!HAS_TRAIT(src, TRAIT_NODEATH))
investigate_log("has died of bloodloss.", INVESTIGATE_DEATHS)
death()

var/temp_bleed = 0
//Bleeding out
Expand Down
34 changes: 1 addition & 33 deletions code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
///If your race bleeds something other than bog standard blood, change this to reagent id. For example, ethereals bleed liquid electricity.
var/datum/reagent/exotic_blood
///If your race uses a non standard bloodtype (A+, O-, AB-, etc). For example, lizards have L type blood.
var/exotic_bloodtype = ""
var/exotic_bloodtype
///The rate at which blood is passively drained by having the blood deficiency quirk. Some races such as slimepeople can regen their blood at different rates so this is to account for that
var/blood_deficiency_drain_rate = BLOOD_REGEN_FACTOR + BLOOD_DEFICIENCY_MODIFIER // slightly above the regen rate so it slowly drains instead of regenerates.
///What the species drops when gibbed by a gibber machine.
Expand Down Expand Up @@ -568,38 +568,6 @@ GLOBAL_LIST_EMPTY(features_by_species)

SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)

/**
* Proc called when mail goodies need to be updated for this species.
*
* Updates the mail goodies if that is required. e.g. for the blood deficiency quirk, which sends bloodbags to quirk holders, update the sent bloodpack to match the species' exotic blood.
* This is currently only used for the blood deficiency quirk but more can be added as needed.
* Arguments:
* * mob/living/carbon/human/recipient - the mob receiving the mail goodies
*/
/datum/species/proc/update_mail_goodies(mob/living/carbon/human/recipient)
update_quirk_mail_goodies(recipient, recipient.get_quirk(/datum/quirk/blooddeficiency))

/**
* Updates the mail goodies of a specific quirk.
*
* Updates the mail goodies belonging to a specific quirk.
* Add implementation as needed for each individual species. The base species proc should give the species the 'default' version of whatever mail goodies are required.
* Arguments:
* * mob/living/carbon/human/recipient - the mob receiving the mail goodies
* * datum/quirk/quirk - the quirk to update the mail goodies of. Use get_quirk(datum/quirk/some_quirk) to get the actual mob's quirk to pass.
* * list/mail_goodies - a list of mail goodies. Generally speaking you should not be using this argument on the initial function call. You should instead add to the species' implementation of this proc.
*/
/datum/species/proc/update_quirk_mail_goodies(mob/living/carbon/human/recipient, datum/quirk/quirk, list/mail_goodies)
if(isnull(quirk))
return
if(length(mail_goodies))
quirk.mail_goodies = mail_goodies
return
if(istype(quirk, /datum/quirk/blooddeficiency))
if(HAS_TRAIT(recipient, TRAIT_NOBLOOD) && isnull(recipient.dna.species.exotic_blood)) // TRAIT_NOBLOOD and no exotic blood (yes we have to check for both, jellypeople exist)
quirk.mail_goodies = list() // means no blood pack gets sent to them.
return

/**
* Handles the body of a human
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
RegisterSignal(new_ethereal, COMSIG_LIVING_HEALTH_UPDATE, PROC_REF(refresh_light_color))
ethereal_light = new_ethereal.mob_light(light_type = /obj/effect/dummy/lighting_obj/moblight/species)
refresh_light_color(new_ethereal)
update_mail_goodies(new_ethereal)

var/obj/item/organ/internal/heart/ethereal/ethereal_heart = new_ethereal.get_organ_slot(ORGAN_SLOT_HEART)
ethereal_heart.ethereal_color = default_color
Expand All @@ -82,13 +81,6 @@
QDEL_NULL(ethereal_light)
return ..()

/datum/species/ethereal/update_quirk_mail_goodies(mob/living/carbon/human/recipient, datum/quirk/quirk, list/mail_goodies = list())
if(istype(quirk, /datum/quirk/blooddeficiency))
mail_goodies += list(
/obj/item/reagent_containers/blood/ethereal
)
return ..()

/datum/species/ethereal/random_name(gender,unique,lastname)
if(unique)
return random_unique_ethereal_name()
Expand Down
54 changes: 21 additions & 33 deletions code/modules/mob/living/carbon/human/species_types/jellypeople.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
if(ishuman(new_jellyperson))
regenerate_limbs = new
regenerate_limbs.Grant(new_jellyperson)
update_mail_goodies(new_jellyperson)
//NOVA EDIT ADDITION BEGIN - CUSTOMIZATION
alter_form = new
alter_form.Grant(new_jellyperson)
//NOVA EDIT ADDITION END
new_jellyperson.AddElement(/datum/element/soft_landing)
RegisterSignal(new_jellyperson, COMSIG_HUMAN_ON_HANDLE_BLOOD, PROC_REF(slime_blood))

/datum/species/jelly/on_species_loss(mob/living/carbon/former_jellyperson, datum/species/new_species, pref_load)
if(regenerate_limbs)
Expand All @@ -64,47 +64,35 @@
alter_form.Remove(former_jellyperson)
//NOVA EDIT ADDITION END
former_jellyperson.RemoveElement(/datum/element/soft_landing)

return ..()

/datum/species/jelly/update_quirk_mail_goodies(mob/living/carbon/human/recipient, datum/quirk/quirk, list/mail_goodies = list())
if(istype(quirk, /datum/quirk/blooddeficiency))
mail_goodies += list(
/obj/item/reagent_containers/blood/toxin
)
UnregisterSignal(former_jellyperson, COMSIG_HUMAN_ON_HANDLE_BLOOD)
return ..()

/datum/species/jelly/spec_life(mob/living/carbon/human/H, seconds_per_tick, times_fired)
. = ..()
if(H.stat == DEAD) //can't farm slime jelly from a dead slime/jelly person indefinitely
return
/datum/species/jelly/proc/slime_blood(mob/living/carbon/human/slime, seconds_per_tick, times_fired)
SIGNAL_HANDLER

if(!H.blood_volume)
H.blood_volume += JELLY_REGEN_RATE_EMPTY * seconds_per_tick
H.adjustBruteLoss(2.5 * seconds_per_tick)
to_chat(H, span_danger("You feel empty!"))
if(slime.stat == DEAD)
return HANDLE_BLOOD_HANDLED

if(H.blood_volume < BLOOD_VOLUME_NORMAL)
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
H.blood_volume += JELLY_REGEN_RATE * seconds_per_tick
if(H.blood_volume <= BLOOD_VOLUME_LOSE_NUTRITION) // don't lose nutrition if we are above a certain threshold, otherwise slimes on IV drips will still lose nutrition
H.adjust_nutrition(-1.25 * seconds_per_tick)
if(slime.blood_volume <= 0)
slime.blood_volume += JELLY_REGEN_RATE_EMPTY * seconds_per_tick
slime.adjustBruteLoss(2.5 * seconds_per_tick)
to_chat(slime, span_danger("You feel empty!"))

// we call lose_blood() here rather than quirk/process() to make sure that the blood loss happens in sync with life()
if(HAS_TRAIT(H, TRAIT_BLOOD_DEFICIENCY))
var/datum/quirk/blooddeficiency/blooddeficiency = H.get_quirk(/datum/quirk/blooddeficiency)
if(!isnull(blooddeficiency))
blooddeficiency.lose_blood(seconds_per_tick)
if(slime.blood_volume < BLOOD_VOLUME_NORMAL)
if(slime.nutrition >= NUTRITION_LEVEL_STARVING)
slime.blood_volume += JELLY_REGEN_RATE * seconds_per_tick
if(slime.blood_volume <= BLOOD_VOLUME_LOSE_NUTRITION) // don't lose nutrition if we are above a certain threshold, otherwise slimes on IV drips will still lose nutrition
slime.adjust_nutrition(-1.25 * seconds_per_tick)

if(H.blood_volume < BLOOD_VOLUME_OKAY)
if(slime.blood_volume < BLOOD_VOLUME_OKAY)
if(SPT_PROB(2.5, seconds_per_tick))
to_chat(H, span_danger("You feel drained!"))
to_chat(slime, span_danger("You feel drained!"))

if(H.blood_volume < BLOOD_VOLUME_BAD)
Cannibalize_Body(H)
if(slime.blood_volume < BLOOD_VOLUME_BAD)
Cannibalize_Body(slime)

if(regenerate_limbs)
regenerate_limbs.build_all_button_icons()
regenerate_limbs?.build_all_button_icons(UPDATE_BUTTON_STATUS)
return HANDLE_BLOOD_NO_NUTRITION_DRAIN|HANDLE_BLOOD_NO_EFFECTS

/datum/species/jelly/proc/Cannibalize_Body(mob/living/carbon/human/H)
var/list/limbs_to_consume = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG) - H.get_missing_limbs()
Expand Down
Loading

0 comments on commit bb7337c

Please sign in to comment.