makes salglu not deadly

This commit is contained in:
Artur
2021-08-02 21:54:47 +03:00
parent 6b5bdae184
commit 5acd7fef2d
21 changed files with 64 additions and 53 deletions
+6 -5
View File
@@ -390,8 +390,9 @@
var/mob/living/carbon/human/H = src
H.handle_blood()
/mob/living/proc/AddIntegrationBlood(value, force)
if(value < 0 && integrating_blood < value) //Remove the normal blood of the carbon if we can't afford it with integrating_blood
blood_volume = min(blood_volume, value)
if(integrating_blood < blood_volume + BLOOD_VOLUME_NORMAL || force)
integrating_blood += value
/mob/living/proc/adjust_integration_blood(value, remove_actual_blood, force)
if(integrating_blood + value < 0 && remove_actual_blood)
blood_volume += value + integrating_blood
blood_volume = max(blood_volume, 0)
integrating_blood += value
integrating_blood = clamp(integrating_blood, 0, force ? INFINITY : (BLOOD_VOLUME_MAXIMUM - (integrating_blood + blood_volume)))
@@ -85,7 +85,7 @@
owner.adjustOxyLoss(-heal_amt)
owner.adjustCloneLoss(-heal_amt)
if(owner.blood_volume && (owner.blood_volume < BLOOD_VOLUME_NORMAL))
owner.AddIntegrationBlood(5)
owner.adjust_integration_blood(5)
else
owner.adjustPlasma(plasma_rate * 0.1)
@@ -183,7 +183,7 @@
destination.undershirt = undershirt
destination.socks = socks
/mob/living/carbon/human/AddIntegrationBlood(value, force)
/mob/living/carbon/human/adjust_integration_blood(value, force)
if(NOBLOOD in dna.species.species_traits) //Can't lose blood if your species doesn't have any
return
. = ..()
@@ -1364,7 +1364,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
/datum/species/proc/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.type == exotic_blood && !istype(exotic_blood, /datum/reagent/blood))
H.AddIntegrationBlood(round(chem.volume, 0.1))
H.adjust_integration_blood(round(chem.volume, 0.1))
H.reagents.del_reagent(chem.type)
return TRUE
return FALSE
@@ -56,13 +56,13 @@
if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_NOMARROW)) //can't farm slime jelly from a dead slime/jelly person indefinitely, and no regeneration for bloodsuckers
return
if(!H.blood_volume)
H.AddIntegrationBlood(5)
H.adjust_integration_blood(5)
H.adjustBruteLoss(5)
to_chat(H, "<span class='danger'>You feel empty!</span>")
if(H.blood_volume < (BLOOD_VOLUME_NORMAL * H.blood_ratio))
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
H.AddIntegrationBlood(3)
H.adjust_integration_blood(3)
H.nutrition -= 2.5
if(H.blood_volume < (BLOOD_VOLUME_OKAY*H.blood_ratio))
if(prob(5))
@@ -82,7 +82,7 @@
consumed_limb.drop_limb()
to_chat(H, "<span class='userdanger'>Your [consumed_limb] is drawn back into your body, unable to maintain its shape!</span>")
qdel(consumed_limb)
H.AddIntegrationBlood(20)
H.adjust_integration_blood(20)
////////////////////////////////////////////////////////SLIMEPEOPLE///////////////////////////////////////////////////////////////////
@@ -151,7 +151,7 @@
if(prob(5))
to_chat(H, "<span class='notice'>You feel very bloated!</span>")
else if(H.nutrition >= NUTRITION_LEVEL_WELL_FED)
H.AddIntegrationBlood(3)
H.adjust_integration_blood(3)
H.nutrition -= 2.5
..()
+1 -1
View File
@@ -112,7 +112,7 @@
var/stun_absorption = null //converted to a list of stun absorption sources this mob has when one is added
var/blood_volume = 0 //how much blood the mob has
var/integrating_blood = 0 //this is the variable you want to affect if you want to give the mob blood, this will slowly turn into normal blood, preventing some cheesyness, use AddIntegrationBlood() instead of modifying directly
var/integrating_blood = 0 //this is the variable you want to affect if you want to give the mob blood, this will slowly turn into normal blood, preventing some cheesyness, use adjust_integration_blood() instead of modifying directly
var/blood_ratio = 1 //How much blood the mob needs, in terms of ratio (i.e 1.2 will require BLOOD_VOLUME_NORMAL of 672) DO NOT GO ABOVE 3.55 Well, actually you can but, then they can't get enough blood.
var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override
@@ -94,7 +94,7 @@
L.SetUnconscious(0, FALSE)
L.adjustOxyLoss(-50)// do CPR first
if(L.blood_volume <= 500) //bandage them up and give em some blood if they're bleeding
L.AddIntegrationBlood(30)
L.adjust_integration_blood(30)
L.bleedsuppress = 0
if(L.getBruteLoss() >= 50)// first, did we beat them into crit? if so, heal that
var/healing = min(L.getBruteLoss(), 120)