From 3e1c75f6ea12e2d3d8d80e44a7d752210f7bb6eb Mon Sep 17 00:00:00 2001 From: LordME <58342752+TheLordME@users.noreply.github.com> Date: Tue, 26 Nov 2024 22:40:05 +0100 Subject: [PATCH 1/2] Gives everyone to drink from blood bags(blood is still toxic to non-vampires) --- citadel.dme | 1 - .../reagents/Chemistry-Reagents-Core.dm | 4 +- .../reagents/reagent_containers/blood_pack.dm | 87 +++++++++++++++++++ .../reagent_containers/blood_pack_vr.dm | 77 ---------------- 4 files changed, 90 insertions(+), 79 deletions(-) delete mode 100644 code/modules/reagents/reagent_containers/blood_pack_vr.dm diff --git a/citadel.dme b/citadel.dme index 6d38e4b30488..30eacce23b76 100644 --- a/citadel.dme +++ b/citadel.dme @@ -4688,7 +4688,6 @@ #include "code\modules\reagents\machinery\reagent_dispenser\water.dm" #include "code\modules\reagents\machinery\reagent_dispenser\watercooler.dm" #include "code\modules\reagents\reagent_containers\blood_pack.dm" -#include "code\modules\reagents\reagent_containers\blood_pack_vr.dm" #include "code\modules\reagents\reagent_containers\borghydro.dm" #include "code\modules\reagents\reagent_containers\cartridge.dm" #include "code\modules\reagents\reagent_containers\dropper.dm" diff --git a/code/modules/reagents/chemistry/reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/chemistry/reagents/Chemistry-Reagents-Core.dm index 3030bec93dd0..06a91a87b28e 100644 --- a/code/modules/reagents/chemistry/reagents/Chemistry-Reagents-Core.dm +++ b/code/modules/reagents/chemistry/reagents/Chemistry-Reagents-Core.dm @@ -41,7 +41,7 @@ /datum/reagent/blood/affect_ingest(mob/living/carbon/M, alien, removed) var/effective_dose = dose - if(issmall(M)) + if(issmall(M)) effective_dose *= 2 var/nutritionvalue = 10 //for reference, normal nutrition has a value of about 30. @@ -79,6 +79,8 @@ M.heal_organ_damage(0.2 * removed * volume_mod, 0) // Heal brute slightly like normal nutrition. More 'effective' blood means more usable material. M.adjust_hydration(2 * removed) // Still has some water in the form of plasma. Hydrates less than a normal drink. M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) //same rating as eating nutriment + if(effective_dose >= 20) + M.vomit(FALSE, FALSE) //Drinking blood makes you vomit, due to the high iron content and unpleasant consistency if(data && data["virus2"]) var/list/vlist = data["virus2"] diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 92bade4d10e5..be46ee896033 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -78,6 +78,15 @@ name = "[base_name] ([label_text])" desc = "[base_desc] It is labeled \"[label_text]\"." +/obj/item/reagent_containers/blood/attack_mob(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent) + if(user.a_intent == INTENT_HARM) + return ..() + . = CLICKCHAIN_DO_NOT_PROPAGATE + standard_feed_mob(user, target) + +/obj/item/reagent_containers/blood/self_feed_message(var/mob/user) + to_chat(user, "You drink from \the [src]") + /obj/item/reagent_containers/blood/APlus blood_type = "A+" @@ -107,3 +116,81 @@ desc = "Seems pretty useless... Maybe if there were a way to fill it?" icon_state = "empty" item_state = "bloodpack_empty" + +/obj/item/reagent_containers/blood/attack_self(mob/user, datum/event_args/actor/actor) + . = ..() + if(.) + return + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/human_user = user + if(human_user.species.is_vampire) + if(user.a_intent == INTENT_HARM) + if(reagents.total_volume && volume) + var/remove_volume = volume* 0.1 //10% of what the bloodpack can hold. + var/reagent_to_remove = reagents.get_master_reagent_id() + switch(reagents.get_master_reagent_id()) + if("blood") + user.show_message("You sink your fangs into \the [src] and suck the blood out of it!") + user.visible_message("[user] sinks their fangs into \the [src] and drains it!") + user.nutrition += remove_volume*4 + reagents.remove_reagent(reagent_to_remove, remove_volume) + update_icon() + if(!bitten_state) + desc += " It has two circular puncture marks in it." + bitten_state = TRUE + return + else + user.show_message("You take a look at \the [src] and notice that it is not filled with blood!") + return + else + user.show_message("You take a look at \the [src] and notice it has nothing in it!") + return + else + return + +/obj/item/reagent_containers/blood/prelabeled + name = "IV Pack" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted." + +/obj/item/reagent_containers/blood/prelabeled/update_iv_label() + return + +/obj/item/reagent_containers/blood/prelabeled/APlus + name = "IV Pack (A+)" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled A+." + blood_type = "A+" + +/obj/item/reagent_containers/blood/prelabeled/AMinus + name = "IV Pack (A-)" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled A-." + blood_type = "A-" + +/obj/item/reagent_containers/blood/prelabeled/BPlus + name = "IV Pack (B+)" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled B+." + blood_type = "B+" + +/obj/item/reagent_containers/blood/prelabeled/BMinus + name = "IV Pack (B-)" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled B-." + blood_type = "B-" + +/obj/item/reagent_containers/blood/prelabeled/ABPlus + name = "IV Pack (AB+)" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled AB+." + blood_type = "AB+" + +/obj/item/reagent_containers/blood/prelabeled/ABMinus + name = "IV Pack (AB-)" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled AB-." + blood_type = "AB-" + +/obj/item/reagent_containers/blood/prelabeled/OPlus + name = "IV Pack (O+)" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled O+." + blood_type = "O+" + +/obj/item/reagent_containers/blood/prelabeled/OMinus + name = "IV Pack (O-)" + desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled O-." + blood_type = "O-" diff --git a/code/modules/reagents/reagent_containers/blood_pack_vr.dm b/code/modules/reagents/reagent_containers/blood_pack_vr.dm deleted file mode 100644 index 7a7c947e2186..000000000000 --- a/code/modules/reagents/reagent_containers/blood_pack_vr.dm +++ /dev/null @@ -1,77 +0,0 @@ -/obj/item/reagent_containers/blood/attack_self(mob/user, datum/event_args/actor/actor) - . = ..() - if(.) - return - if(istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/human_user = user - if(human_user.species.is_vampire) - if(user.a_intent == INTENT_HARM) - if(reagents.total_volume && volume) - var/remove_volume = volume* 0.1 //10% of what the bloodpack can hold. - var/reagent_to_remove = reagents.get_master_reagent_id() - switch(reagents.get_master_reagent_id()) - if("blood") - user.show_message("You sink your fangs into \the [src] and suck the blood out of it!") - user.visible_message("[user] sinks their fangs into \the [src] and drains it!") - user.nutrition += remove_volume*4 - reagents.remove_reagent(reagent_to_remove, remove_volume) - update_icon() - if(!bitten_state) - desc += " It has two circular puncture marks in it." - bitten_state = TRUE - return - else - user.show_message("You take a look at \the [src] and notice that it is not filled with blood!") - return - else - user.show_message("You take a look at \the [src] and notice it has nothing in it!") - return - else - return - -/obj/item/reagent_containers/blood/prelabeled - name = "IV Pack" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted." - -/obj/item/reagent_containers/blood/prelabeled/update_iv_label() - return - -/obj/item/reagent_containers/blood/prelabeled/APlus - name = "IV Pack (A+)" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled A+." - blood_type = "A+" - -/obj/item/reagent_containers/blood/prelabeled/AMinus - name = "IV Pack (A-)" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled A-." - blood_type = "A-" - -/obj/item/reagent_containers/blood/prelabeled/BPlus - name = "IV Pack (B+)" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled B+." - blood_type = "B+" - -/obj/item/reagent_containers/blood/prelabeled/BMinus - name = "IV Pack (B-)" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled B-." - blood_type = "B-" - -/obj/item/reagent_containers/blood/prelabeled/ABPlus - name = "IV Pack (AB+)" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled AB+." - blood_type = "AB+" - -/obj/item/reagent_containers/blood/prelabeled/ABMinus - name = "IV Pack (AB-)" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled AB-." - blood_type = "AB-" - -/obj/item/reagent_containers/blood/prelabeled/OPlus - name = "IV Pack (O+)" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled O+." - blood_type = "O+" - -/obj/item/reagent_containers/blood/prelabeled/OMinus - name = "IV Pack (O-)" - desc = "Holds liquids used for transfusion. This one's label seems to be hardprinted. This one is labeled O-." - blood_type = "O-" From 5a0248a6039fe5d89f92f9e0b225028e83442046 Mon Sep 17 00:00:00 2001 From: LordME <58342752+TheLordME@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:55:01 +0100 Subject: [PATCH 2/2] only a probability to vomit, and no more healing for non vampires --- .../reagents/chemistry/reagents/Chemistry-Reagents-Core.dm | 3 +-- code/modules/reagents/reagent_containers/blood_pack.dm | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/chemistry/reagents/Chemistry-Reagents-Core.dm index 06a91a87b28e..3a6f91bf8219 100644 --- a/code/modules/reagents/chemistry/reagents/Chemistry-Reagents-Core.dm +++ b/code/modules/reagents/chemistry/reagents/Chemistry-Reagents-Core.dm @@ -76,10 +76,9 @@ M.add_chemical_effect(CE_BLOODRESTORE, 8 * removed) // Same rating as taking iron else M.adjust_nutrition(nutritionvalue * removed * volume_mod) - M.heal_organ_damage(0.2 * removed * volume_mod, 0) // Heal brute slightly like normal nutrition. More 'effective' blood means more usable material. M.adjust_hydration(2 * removed) // Still has some water in the form of plasma. Hydrates less than a normal drink. M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) //same rating as eating nutriment - if(effective_dose >= 20) + if(effective_dose >= 20 && prob(10)) M.vomit(FALSE, FALSE) //Drinking blood makes you vomit, due to the high iron content and unpleasant consistency if(data && data["virus2"]) diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index be46ee896033..8356dc2934a1 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -126,14 +126,11 @@ if(human_user.species.is_vampire) if(user.a_intent == INTENT_HARM) if(reagents.total_volume && volume) - var/remove_volume = volume* 0.1 //10% of what the bloodpack can hold. - var/reagent_to_remove = reagents.get_master_reagent_id() switch(reagents.get_master_reagent_id()) if("blood") user.show_message("You sink your fangs into \the [src] and suck the blood out of it!") user.visible_message("[user] sinks their fangs into \the [src] and drains it!") - user.nutrition += remove_volume*4 - reagents.remove_reagent(reagent_to_remove, remove_volume) + standard_feed_mob(user, user) update_icon() if(!bitten_state) desc += " It has two circular puncture marks in it."