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
🆑
fix: Fixed constant runtimes and broken APC processing behavior on
emagged APCs
/🆑
This commit is contained in:
SmArtKar
2025-09-03 19:38:16 -07:00
committed by GitHub
parent 2f3ae568eb
commit 4ffc1b31a7
+4 -5
View File
@@ -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<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
if(malfai && COOLDOWN_FINISHED(src, malf_ai_pt_generation) && cell.use(60 KILO JOULES) > 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)