From 4ffc1b31a74ace70b8d3dbe5bbb094be74f07dd5 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Thu, 4 Sep 2025 04:38:16 +0200 Subject: [PATCH] Fixes constant runtimes and broken APC processing behavior on emagged APCs (#92757) ## About The Pull Request If an APC was emagged it would permanently half-break as it would assume that it had a malf AI that it needed to add points to, and would not update its charge states ## Changelog :cl: fix: Fixed constant runtimes and broken APC processing behavior on emagged APCs /:cl: --- code/modules/power/apc/apc_main.dm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/modules/power/apc/apc_main.dm b/code/modules/power/apc/apc_main.dm index 92ccd59f8c6..dbdf8325db4 100644 --- a/code/modules/power/apc/apc_main.dm +++ b/code/modules/power/apc/apc_main.dm @@ -590,15 +590,14 @@ force_update = TRUE return - if(obj_flags & EMAGGED || malfai) + if((obj_flags & EMAGGED) || malfai) hacked_flicker_counter = hacked_flicker_counter - 1 if(hacked_flicker_counter <= 0) flicker_hacked_icon() - if(COOLDOWN_FINISHED(src, malf_ai_pt_generation) && cell.use(60 KILO JOULES)>0 && malfai.malf_picker.processing_time 0 && malfai.malf_picker.processing_time < MALF_MAX_PP) // Over time generation of malf points for the ai controlling it, costs a bit of power + COOLDOWN_START(src, malf_ai_pt_generation, 30 SECONDS) + malfai.malf_picker.processing_time += 1 //dont use any power from that channel if we shut that power channel off if(operating)