mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 08:01:06 +00:00
Fix vending machines not updating their power when moved (#10714)
This commit is contained in:
@@ -318,6 +318,7 @@
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
|
||||
anchored = !anchored
|
||||
power_change()
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/vending_refill))
|
||||
@@ -779,6 +780,8 @@
|
||||
|
||||
/obj/machinery/vending/power_change()
|
||||
..()
|
||||
if(!anchored)
|
||||
stat |= NOPOWER
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
cut_overlays()
|
||||
@@ -833,4 +836,4 @@
|
||||
spawn(0)
|
||||
throw_item.throw_at(target, 16, 3, src)
|
||||
src.visible_message("<span class='warning'>[src] launches [throw_item.name] at [target.name]!</span>")
|
||||
return 1
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user