IV bags now support being mapped onto IV drips (#18475)

* mapping IVs!

* comment

* address AA

* remove 2nd update_icon()

* HAL review

* farie review

* Steelslayer suggestion
This commit is contained in:
Contrabang
2022-08-04 10:56:19 +01:00
committed by GitHub
parent 6c2f962d68
commit ea0ae5225e
+14
View File
@@ -9,6 +9,20 @@
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
var/obj/item/reagent_containers/iv_bag/bag = null
/obj/machinery/iv_drip/Initialize(mapload)
. = ..()
if(!mapload || bag) // bag just in case anyone in the future ever adds IV drip subtypes with bags attached
return
return INITIALIZE_HINT_LATELOAD
/obj/machinery/iv_drip/LateInitialize()
var/obj/item/reagent_containers/iv_bag/IV = locate(/obj/item/reagent_containers/iv_bag) in loc
if(IV)
IV.forceMove(src)
bag = IV
START_PROCESSING(SSmachines, src)
update_icon(UPDATE_OVERLAYS)
/obj/machinery/iv_drip/process()
if(istype(bag) && bag.injection_target)
update_icon(UPDATE_OVERLAYS)