From 67ec43231546045e7f4a3112230d756a2fd6cb72 Mon Sep 17 00:00:00 2001 From: Doxxmedearly <38594443+Doxxmedearly@users.noreply.github.com> Date: Wed, 19 Jul 2023 06:18:50 -0400 Subject: [PATCH] Fixes weird containers for IV drips (#16784) --- code/game/machinery/iv_drip.dm | 8 +++++++- code/game/objects/structures/stool_bed_chair_nest/bed.dm | 7 ++++++- html/changelogs/doxxmedearly-iv_sanity.yml | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/doxxmedearly-iv_sanity.yml diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index b5492a554ed..2fc065ec601 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -37,6 +37,12 @@ var/epp = TRUE // Emergency Positive Pressure system. Can be toggled if you want to turn it off var/epp_active = FALSE + //What we accept as a container for IV transfers. Prevents attaching food and organs to IVs. + var/list/accepted_containers = list( + /obj/item/reagent_containers/blood, + /obj/item/reagent_containers/glass/beaker, + /obj/item/reagent_containers/glass/bottle) + var/list/mask_blacklist = list( /obj/item/clothing/mask/gas/vaurca, /obj/item/clothing/mask/breath/skrell, @@ -415,7 +421,7 @@ if(istype(W, /obj/item/reagent_containers/blood/ripped)) to_chat(user, "You can't use a ripped bloodpack.") return TRUE - if(istype(W, /obj/item/reagent_containers)) + if(is_type_in_list(W, accepted_containers)) if(beaker) to_chat(user, "There is already a reagent container loaded!") return TRUE diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 9b4bb2a39f7..ead99baec82 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -372,6 +372,11 @@ var/obj/item/vitals_monitor/vitals var/iv_attached = 0 var/iv_stand = TRUE + //Items that can be attached to an IV + var/list/accepted_containers = list( + /obj/item/reagent_containers/blood, + /obj/item/reagent_containers/glass/beaker, + /obj/item/reagent_containers/glass/bottle) var/patient_shift = 9 //How much are mobs moved up when they are buckled_to. slowdown = 0 @@ -419,7 +424,7 @@ vitals.bed = src update_icon() return - if(iv_stand && !beaker && (istype(I, /obj/item/reagent_containers/glass/beaker) || istype(I, /obj/item/reagent_containers/blood))) + if(iv_stand && !beaker && is_type_in_list(I, accepted_containers)) if(!user.unEquip(I, target = src)) return to_chat(user, SPAN_NOTICE("You attach \the [I] to \the [src].")) diff --git a/html/changelogs/doxxmedearly-iv_sanity.yml b/html/changelogs/doxxmedearly-iv_sanity.yml new file mode 100644 index 00000000000..bd16c3f7659 --- /dev/null +++ b/html/changelogs/doxxmedearly-iv_sanity.yml @@ -0,0 +1,4 @@ +author: Doxxmedearly +delete-after: True +changes: + - bugfix: "IV drips, including rollerbed IVs, are limited to accepting bloodbags, beakers, and bottles as reagent containers. No more attaching food to IVs."