mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
fix(blood): Modifies remove_reagent calls to remove_blood calls
Fixes https://github.com/VOREStation/VOREStation/issues/14817 remove_reagent has no sanitization for making sure the person has at least 1 u of blood remaining, and is therefore unsafe to use. This commit changes all human remove_reagent("blood", amt) calls with remove_blood(amt). This should prevent blood disappearing from internal bleeding or dragging someone while they're down or from drawing blood from them and so forth. Not all cases of remove_reagent("blood", amt) were changed, as some act on organs or other reagent containers not part of a human mob or because it's set_species
This commit is contained in:
@@ -472,7 +472,7 @@
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(!H.should_have_organ(O_HEART))
|
||||
return 1
|
||||
if(H.vessel.remove_reagent("blood", amount))
|
||||
if(H.remove_blood(amount))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -673,4 +673,4 @@
|
||||
else
|
||||
user.visible_message("<b>\The [user]</b> lowers its fist.")
|
||||
return
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -1261,7 +1261,7 @@
|
||||
vessel.maximum_volume = species.blood_volume
|
||||
vessel.add_reagent("blood", species.blood_volume - vessel.total_volume)
|
||||
else if(vessel.total_volume > species.blood_volume)
|
||||
vessel.remove_reagent("blood", vessel.total_volume - species.blood_volume)
|
||||
vessel.remove_reagent("blood",vessel.total_volume - species.blood_volume) //This one should stay remove_reagent to work even lack of a O_heart
|
||||
vessel.maximum_volume = species.blood_volume
|
||||
fixblood()
|
||||
species.update_attack_types() //VOREStation Edit - Required for any trait that updates unarmed_types in setup.
|
||||
@@ -1731,7 +1731,7 @@
|
||||
if(blood_volume < species?.blood_volume*species?.blood_level_fatal)
|
||||
bloodtrail = 0 //Most of it's gone already, just leave it be
|
||||
else
|
||||
vessel.remove_reagent("blood", 1)
|
||||
remove_blood(1)
|
||||
if(bloodtrail)
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/T = loc
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
if(!docile && ishuman(host) && chemicals < max_chemicals)
|
||||
var/mob/living/carbon/human/H = host
|
||||
H.vessel.remove_reagent("blood", 1)
|
||||
H.remove_blood(1)
|
||||
if(!H.reagents.has_reagent("inaprovaline"))
|
||||
H.reagents.add_reagent("inaprovaline", 1)
|
||||
chemicals += 2
|
||||
|
||||
@@ -260,7 +260,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
return null
|
||||
|
||||
. = ..()
|
||||
vessel.remove_reagent("blood",amount) // Removes blood if human
|
||||
remove_blood(amount) // Removes blood if human
|
||||
|
||||
//Transfers blood from container ot vessels
|
||||
/mob/living/carbon/proc/inject_blood(var/datum/reagent/blood/injected, var/amount)
|
||||
|
||||
@@ -750,7 +750,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(!(W.can_autoheal() || (bicardose && inaprovaline) || myeldose)) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, unless it is so small that it is already healing
|
||||
W.open_wound(0.1 * wound_update_accuracy)
|
||||
|
||||
owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place.
|
||||
owner.remove_blood( wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place.
|
||||
if(prob(1 * wound_update_accuracy))
|
||||
owner.custom_pain("You feel a stabbing pain in your [name]!", 50)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
B.target_turf = pick(RANGE_TURFS(1, holder))
|
||||
B.blood_DNA = list()
|
||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
M.vessel.remove_reagent("blood",rand(10,30))
|
||||
M.remove_blood(rand(10,30))
|
||||
|
||||
/datum/artifact_effect/vampire/DoEffectTouch(var/mob/user)
|
||||
bloodcall(user)
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
B.target_turf = pick(range(1, src))
|
||||
B.blood_DNA = list()
|
||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
M.vessel.remove_reagent("blood",rand(25,50))
|
||||
M.remove_blood(rand(25,50))
|
||||
|
||||
//animated blood 2 SPOOKY
|
||||
/obj/effect/decal/cleanable/blood/splatter/animated
|
||||
|
||||
Reference in New Issue
Block a user