mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user