Skip to content

Commit

Permalink
fix beams existing indefinitely on loss of power
Browse files Browse the repository at this point in the history
  • Loading branch information
realkhad committed Jun 26, 2023
1 parent c1ddcd5 commit 6e74d4e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions code/game/machinery/iv_drip.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,20 @@
if(current_beam)
QDEL_NULL(current_beam)

/obj/structure/machinery/iv_drip/power_change()
. = ..()
if(stat & NOPOWER && attached)
visible_message("\The [src] retracts its IV tube and shuts down.")
attached.active_transfusions -= src
attached = null
delete_beam()
update_icon()

/obj/structure/machinery/iv_drip/MouseDrop(over_object, src_location, over_location)
..()
if(src.inoperable())
visible_message("\The [src] is not powered.")
return

if(ishuman(usr))
var/mob/living/carbon/human/H = usr
Expand Down

0 comments on commit 6e74d4e

Please sign in to comment.