mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user