From 8844a2ab97ef2444b2b63f15f98531331a805b88 Mon Sep 17 00:00:00 2001 From: Arthri <41360489+Arthri@users.noreply.github.com> Date: Sat, 2 Mar 2024 07:34:09 +0800 Subject: [PATCH] Removes Toxin Damage from Drinking Blood in Virus Culture Bottles (#23968) * Make spawned_disease use O- * Change type to Vh Null * Make Vh Null not update blood_volume * Make Vh Null not feed vampires * Move string to define * Update code/__DEFINES/reagents_defines.dm Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> --------- Co-authored-by: Arthri <41360489+a@users.noreply.github.com> Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> --- code/__DEFINES/reagents_defines.dm | 3 +++ .../reagents/chemistry/reagents/water.dm | 2 +- .../reagents/chemistry/reagents_datum.dm | 3 ++- code/modules/reagents/reagent_containers.dm | 2 +- code/modules/surgery/organs/blood.dm | 18 +++++++++--------- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/code/__DEFINES/reagents_defines.dm b/code/__DEFINES/reagents_defines.dm index 14f796da040..7dfe52837b1 100644 --- a/code/__DEFINES/reagents_defines.dm +++ b/code/__DEFINES/reagents_defines.dm @@ -29,3 +29,6 @@ #define SYRINGE_DRAW 0 #define SYRINGE_INJECT 1 #define SYRINGE_BROKEN 2 + +/// Like O- blood but doesn't contribute to blood_volume or vampire nutrition +#define BLOOD_TYPE_FAKE_BLOOD "Vh Null" diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 25d4c98451e..451cc4fa829 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -118,7 +118,7 @@ if(method == REAGENT_INGEST && iscarbon(M)) var/mob/living/carbon/C = M - if(C.mind?.has_antag_datum(/datum/antagonist/vampire)) + if(C.mind?.has_antag_datum(/datum/antagonist/vampire) && data["blood_type"] != BLOOD_TYPE_FAKE_BLOOD) C.set_nutrition(min(NUTRITION_LEVEL_WELL_FED, C.nutrition + 10)) C.blood_volume = min(C.blood_volume + round(volume, 0.1), BLOOD_VOLUME_NORMAL) ..() diff --git a/code/modules/reagents/chemistry/reagents_datum.dm b/code/modules/reagents/chemistry/reagents_datum.dm index 6f2f09a42e5..fa5aa62e884 100644 --- a/code/modules/reagents/chemistry/reagents_datum.dm +++ b/code/modules/reagents/chemistry/reagents_datum.dm @@ -78,7 +78,8 @@ if(id == "blood" && !(data?["blood_type"] in get_safe_blood(C.dna?.blood_type)) || C.dna?.species.name != data?["species"] && (data?["species_only"] || C.dna?.species.own_species_blood)) C.reagents.add_reagent("toxin", volume * 0.5) else - C.blood_volume = min(C.blood_volume + round(volume, 0.1), BLOOD_VOLUME_NORMAL) + if(data?["blood_type"] != BLOOD_TYPE_FAKE_BLOOD) + C.blood_volume = min(C.blood_volume + round(volume, 0.1), BLOOD_VOLUME_NORMAL) // This does not absorb the blood we are getting in *this* reagent transfer operation, // (because the actual transfer has not happened yet. Because reasons) but it does process // the blood already in the mob. diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 44bb7655de2..7a70db39f57 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -39,7 +39,7 @@ create_reagents(volume, temperature_min, temperature_max) if(spawned_disease) var/datum/disease/F = new spawned_disease(0) - var/list/data = list("viruses" = list(F), "blood_color" = "#A10808") + var/list/data = list("viruses" = list(F), "blood_color" = "#A10808", "blood_type" = BLOOD_TYPE_FAKE_BLOOD) reagents.add_reagent("blood", disease_amount, data) add_initial_reagents() diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index f16ef7cecd8..ab99f91591a 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -234,26 +234,26 @@ // This is has more potential uses, and is probably faster than the old proc. /proc/get_safe_blood(bloodtype) - . = list() + . = list(BLOOD_TYPE_FAKE_BLOOD) if(!bloodtype) return switch(bloodtype) if("A-") - return list("A-", "O-") + . += list("A-", "O-") if("A+") - return list("A-", "A+", "O-", "O+") + . += list("A-", "A+", "O-", "O+") if("B-") - return list("B-", "O-") + . += list("B-", "O-") if("B+") - return list("B-", "B+", "O-", "O+") + . += list("B-", "B+", "O-", "O+") if("AB-") - return list("A-", "B-", "O-", "AB-") + . += list("A-", "B-", "O-", "AB-") if("AB+") - return list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+") + . += list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+") if("O-") - return list("O-") + . += list("O-") if("O+") - return list("O-", "O+") + . += list("O-", "O+") //to add a splatter of blood or other mob liquid. /mob/living/proc/add_splatter_floor(turf/T, small_drip, shift_x, shift_y, emittor_intertia)