Fix vending machines not updating their power when moved (#10714)

This commit is contained in:
Wildkins
2020-12-03 07:09:34 -05:00
committed by GitHub
parent 8f1fd0592f
commit cc87fe7a4f
2 changed files with 10 additions and 1 deletions

View File

@@ -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()

View File

@@ -0,0 +1,6 @@
author: JohnWildkins
delete-after: True
changes:
- bugfix: "Unanchoring and moving vending machines should now properly update their powered status."