From a8c8bb7fa67a08c0487b7d0183f5031c19b1c678 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 5 Jan 2014 14:13:58 +1030 Subject: [PATCH] Added NO_BLOOD checks to drips, syringes. Conflicts: code/modules/organs/blood.dm --- code/game/machinery/iv_drip.dm | 4 ++++ code/modules/organs/blood.dm | 2 -- code/modules/reagents/reagent_containers/syringes.dm | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 2074bfd3ff5..9f10ac4eccc 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -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.") diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 50c8564c793..5a32caf98a7 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -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 diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 699b4a8b24a..77342229454 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -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)