Skip to content

Commit

Permalink
Fix beams for IV drip machines when adding/removing a blood bag
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Aug 9, 2023
1 parent 147ac8c commit e156fa2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/game/machinery/iv_drip.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
overlays += filling

/obj/structure/machinery/iv_drip/proc/update_beam()
if(current_beam)
if(current_beam && !attached)
QDEL_NULL(current_beam)
else if(!QDELETED(src) && attached)
else if(!current_beam && attached && !QDELETED(src))
current_beam = beam(attached, "iv_tube")

/obj/structure/machinery/iv_drip/power_change()
Expand All @@ -55,6 +55,7 @@

/obj/structure/machinery/iv_drip/Destroy()
attached?.active_transfusions -= src
attached = null
update_beam()
. = ..()

Expand Down

0 comments on commit e156fa2

Please sign in to comment.