Fixes weird containers for IV drips (#16784)

This commit is contained in:
Doxxmedearly
2023-07-19 10:18:50 +00:00
committed by GitHub
parent b9ac60a0dd
commit 67ec432315
3 changed files with 17 additions and 2 deletions
@@ -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]."))