Added NO_BLOOD checks to drips, syringes.

Conflicts:
	code/modules/organs/blood.dm
This commit is contained in:
Zuhayr
2014-01-05 14:13:58 +10:30
committed by ZomgPonies
parent 2aaa601aac
commit a8c8bb7fa6
3 changed files with 10 additions and 2 deletions
+4
View File
@@ -70,6 +70,7 @@
set background = 1
if(src.attached)
if(!(get_dist(src, src.attached) <= 1 && isturf(src.attached.loc)))
visible_message("The needle is ripped out of [src.attached], doesn't that hurt?")
src.attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
@@ -105,6 +106,9 @@
if(NOCLONE in T.mutations)
return
if(T.species && T.species.flags & NO_BLOOD)
return
// If the human is losing too much blood, beep.
if(T.vessel.get_reagent_amount("blood") < BLOOD_VOLUME_SAFE) if(prob(5))
visible_message("\The [src] beeps loudly.")
-2
View File
@@ -208,8 +208,6 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//Gets blood from mob to the container, preserving all data in it.
/mob/living/carbon/proc/take_blood(obj/item/weapon/reagent_containers/container, var/amount)
var/datum/reagent/B = get_blood(container.reagents)
if(!B) B = new /datum/reagent/blood
B.holder = container
@@ -88,6 +88,12 @@
user << "\red You are unable to locate any blood."
return
if(istype(T,/mob/living/carbon/human)) //TODO: make blood sampling take from the reagents datum instead of vessel.
var/mob/living/carbon/human/H = T
if(H.species && H.species.flags & NO_BLOOD)
user << "\red You are unable to locate any blood."
return
var/datum/reagent/B = T.take_blood(src,amount)
if (B)