From f7028b7fef527bf8f6657b4e2849715df3523521 Mon Sep 17 00:00:00 2001 From: Patrick Meade Date: Tue, 14 Jul 2020 03:00:48 -0500 Subject: [PATCH] Use proper procs for obtaining cell and changing charge --- code/modules/events/apc_short.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/events/apc_short.dm b/code/modules/events/apc_short.dm index 51511aa60ed..c19b6cbe8b7 100644 --- a/code/modules/events/apc_short.dm +++ b/code/modules/events/apc_short.dm @@ -64,11 +64,12 @@ // recharge the APCs for(var/thing in GLOB.apcs) - var/obj/machinery/power/apc/C = thing - if(!is_station_level(C.z)) + var/obj/machinery/power/apc/A = thing + if(!is_station_level(A.z)) continue - if(C.cell) - C.cell.charge = C.cell.maxcharge + var/obj/item/stock_parts/cell/C = A.get_cell() + if(C) + C.give(C.maxcharge) /proc/power_restore_quick(announce=TRUE) if(announce)