diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index b217c14e..9df7d206 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -13,7 +13,8 @@ var/obj/item/reagent_containers/beaker = null var/static/list/drip_containers = typecacheof(list(/obj/item/reagent_containers/blood, /obj/item/reagent_containers/food, - /obj/item/reagent_containers/glass)) + /obj/item/reagent_containers/glass, + /obj/item/reagent_containers/chem_pack)) /obj/machinery/iv_drip/Initialize() . = ..() @@ -129,9 +130,7 @@ if(istype(beaker, /obj/item/reagent_containers/blood)) // speed up transfer on blood packs transfer_amount = 10 - var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume - beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages - beaker.reagents.trans_to(attached, transfer_amount) + beaker.reagents.trans_to(attached, transfer_amount, method = INJECT, show_message = FALSE) //make reagents reacts, but don't spam messages update_icon() // Take blood diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 4e719625..3dbf1847 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -364,7 +364,7 @@ STR.max_combined_w_class = 200 STR.max_items = 50 STR.insert_preposition = "in" - STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle)) + STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/chem_pack)) /* * Biowaste bag (mostly for xenobiologists) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 7eea6fb9..c996c65b 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -141,8 +141,7 @@ All foods are distributed among various categories. Use common sense. if(reagents.total_volume) SEND_SIGNAL(src, COMSIG_FOOD_EATEN, M, user) var/fraction = min(bitesize / reagents.total_volume, 1) - reagents.reaction(M, INGEST, fraction) - reagents.trans_to(M, bitesize) + reagents.trans_to(M, bitesize, transfered_by = user, method = INGEST) bitecount++ On_Consume(M) checkLiked(fraction, M) diff --git a/code/modules/food_and_drinks/recipes/food_mixtures.dm b/code/modules/food_and_drinks/recipes/food_mixtures.dm index d10286d2..f88b170f 100644 --- a/code/modules/food_and_drinks/recipes/food_mixtures.dm +++ b/code/modules/food_and_drinks/recipes/food_mixtures.dm @@ -161,3 +161,5 @@ new /obj/item/reagent_containers/food/snacks/salad/ricebowl(location) if(holder && holder.my_atom) qdel(holder.my_atom) + + diff --git a/code/modules/reagents/reagent_containers/chem_pack.dm b/code/modules/reagents/reagent_containers/chem_pack.dm new file mode 100644 index 00000000..9a62cf47 --- /dev/null +++ b/code/modules/reagents/reagent_containers/chem_pack.dm @@ -0,0 +1,49 @@ +/obj/item/reagent_containers/chem_pack + name = "intravenous medicine bag" + desc = "A plastic pressure bag, or 'chem pack', for IV administration of drugs. It is fitted with a thermosealing strip." + icon = 'icons/obj/blood_pack.dmi' + icon_state = "chempack" + volume = 100 + reagent_flags = OPENCONTAINER + spillable = TRUE + obj_flags = UNIQUE_RENAME + resistance_flags = ACID_PROOF + var/sealed = FALSE + +/obj/item/reagent_containers/chem_pack/on_reagent_change(changetype) + update_icon() + +/obj/item/reagent_containers/chem_pack/update_icon() + cut_overlays() + + var/v = min(round(reagents.total_volume / volume * 10), 10) + if(v > 0) + var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "chempack1") + filling.icon_state = "chempack[v]" + filling.color = mix_color_from_reagents(reagents.reagent_list) + add_overlay(filling) + +/obj/item/reagent_containers/chem_pack/AltClick(mob/living/user) + if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERY) && !sealed) + if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))) + to_chat(user, "Uh... whoops! You accidentally spill the content of the bag onto yourself.") + SplashReagents(user) + return + + reagent_flags = DRAWABLE | INJECTABLE //To allow for sabotage or ghetto use. + spillable = FALSE + sealed = TRUE + to_chat(user, "You seal the bag.") + +/obj/item/reagent_containers/chem_pack/examine() + . = ..() + if(sealed) + . += "The bag is sealed shut." + else + . += "Alt-click to seal it." + + +obj/item/reagent_containers/chem_pack/attack_self(mob/user) + if(sealed) + return + ..() \ No newline at end of file diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 33568524..011f63df 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -182,6 +182,17 @@ category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/chem_pack + name = "Intravenous Medicine Bag" + desc = "A plastic pressure bag for IV administration of drugs." + id = "chem_pack" + build_type = PROTOLATHE + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + materials = list(MAT_PLASTIC = 2000) + build_path = /obj/item/reagent_containers/chem_pack + category = list("Medical Designs") + /datum/design/blood_bag name = "Empty Blood Bag" desc = "A small sterilized plastic bag for blood." diff --git a/icons/obj/blood_pack.dmi b/icons/obj/blood_pack.dmi new file mode 100644 index 00000000..efcf670d Binary files /dev/null and b/icons/obj/blood_pack.dmi differ diff --git a/icons/obj/bloodpack.dmi b/icons/obj/bloodpack.dmi index 3a5b9fd7..efcf670d 100644 Binary files a/icons/obj/bloodpack.dmi and b/icons/obj/bloodpack.dmi differ diff --git a/icons/obj/reagentfillings.dmi b/icons/obj/reagentfillings.dmi index 1b8dacf3..fa74d50e 100644 Binary files a/icons/obj/reagentfillings.dmi and b/icons/obj/reagentfillings.dmi differ