From a01e7dcf40e8a25028062b763f9147a81809a2e4 Mon Sep 17 00:00:00 2001 From: MidoriKurage <104000416+mdrkrg@users.noreply.github.com> Date: Mon, 9 Feb 2026 20:59:43 +0800 Subject: [PATCH] fix: APC sprites stuck in fully drained states on round start (#42852) * Fix APC incorrect charge state caused by race condition on map startup * fix: Defer the update from ChargeChangedEvent to next tick --- Content.Server/Power/EntitySystems/ApcSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/Power/EntitySystems/ApcSystem.cs b/Content.Server/Power/EntitySystems/ApcSystem.cs index 8956504346b..19ddc6189c2 100644 --- a/Content.Server/Power/EntitySystems/ApcSystem.cs +++ b/Content.Server/Power/EntitySystems/ApcSystem.cs @@ -87,7 +87,8 @@ public sealed class ApcSystem : EntitySystem // Change the APC's state only when the battery state changes, or when it's first created. private void OnBatteryChargeChanged(EntityUid uid, ApcComponent component, ref ChargeChangedEvent args) { - UpdateApcState(uid, component); + // Defer until the next tick. + component.NeedStateUpdate = true; } private static void OnApcStartup(EntityUid uid, ApcComponent component, ComponentStartup args)