Fixes gun overlays not updating when the cell is deleted (#48107)

Fixes gun overlays not updating when the cell is deleted
This commit is contained in:
ShizCalev
2019-12-05 03:40:17 -05:00
committed by Rob Bailey
parent 39f4c4c223
commit c30dcf7d61

View File

@@ -62,6 +62,12 @@
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/handle_atom_del(atom/A)
if(A == cell)
cell = null
update_icon(FALSE, TRUE)
return ..()
/obj/item/gun/energy/process()
if(selfcharge && cell && cell.percent() < 100)
charge_tick++