Merge pull request #10011 from Arturlang/Bloodsuckers

Bloodsuckers, or, yknow, vampires.
This commit is contained in:
Putnam3145
2019-12-15 14:41:36 -08:00
committed by GitHub
104 changed files with 6026 additions and 35 deletions
@@ -610,6 +610,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
value = 1.3
/datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/carbon/C)
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
return
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
C.blood_volume = min((BLOOD_VOLUME_NORMAL*C.blood_ratio), C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
..()
@@ -355,6 +355,8 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
value = 1
/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M)
if((HAS_TRAIT(M, TRAIT_NOMARROW)))
return
if(last_added)
M.blood_volume -= last_added
last_added = 0
@@ -30,7 +30,7 @@
if(iscarbon(L))
var/mob/living/carbon/C = L
var/blood_id = C.get_blood_id()
if((blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
if((HAS_TRAIT(C, TRAIT_NOMARROW) || blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM * C.blood_ratio)
// we don't care about bloodtype here, we're just refilling the mob
@@ -38,6 +38,8 @@
L.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
/datum/reagent/blood/on_mob_life(mob/living/carbon/C) //Because lethals are preferred over stamina. damnifino.
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
return //We dont want vampires getting toxed from blood
var/blood_id = C.get_blood_id()
if((blood_id == "blood" || blood_id == "jellyblood"))
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))) //we only care about bloodtype here because this is where the poisoning should be
@@ -1116,6 +1118,8 @@
color = "#c2391d"
/datum/reagent/iron/on_mob_life(mob/living/carbon/C)
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
return
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
C.blood_volume += 0.01 //we'll have synthetics from medbay.
..()
@@ -107,8 +107,29 @@
else
return ..()
/obj/item/reagent_containers/blood/attack(mob/M, mob/user, def_zone)
if(user.a_intent == INTENT_HELP && reagents.total_volume > 0)
if (user != M)
to_chat(user, "<span class='notice'>You force [M] to drink from the [src]</span>")
user.visible_message("<span class='userdanger'>[user] forces [M] to drink from the [src].</span>")
if(!do_mob(user, M, 50))
return
else
if(!do_mob(user, M, 10))
return
to_chat(user, "<span class='notice'>You take a sip from the [src].</span>")
user.visible_message("<span class='notice'>[user] puts the [src] up to their mouth.</span>")
if(reagents.total_volume <= 0) // Safety: In case you spam clicked the blood bag on yourself, and it is now empty (below will divide by zero)
return
var/gulp_size = 5
var/fraction = min(gulp_size / reagents.total_volume, 1)
reagents.reaction(M, INGEST, fraction) //checkLiked(fraction, M) // Blood isn't food, sorry.
reagents.trans_to(M, gulp_size)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
..()
/obj/item/reagent_containers/blood/bluespace
name = "bluespace blood pack"
desc = "Contains blood used for transfusion, this one has been made with bluespace technology to hold much more blood. Must be attached to an IV drip."
icon_state = "bsbloodpack"
volume = 600 //its a blood bath!
volume = 600 //its a blood bath!