Delta-v/Content.Server/Power/EntitySystems
Pieter-Jan Briers 4a2fe34404
Fix bugs resulting in quantum APC visual states (#29475)
There were TWO bugs here

FIRST, APCs *did* update their visual state on initialization, but at that point the relevant power state hasn't been initialized yet, so it always returns a bogus result. There aren't guaranteed to be subsequent power updates that actually trigger the APC to update so this can get it stuck.

Fixed by just deferring the on-init update to be after the first update tick, which is itself ordered to be after power update.

SECOND: Once I fixed that, I ran into the issue that APCs created at *server startup* also fail to update, because the throttling system (to prevent frequent APC updates) thinks the LastChargeStateTime was at server startup.

Fixed by making that variable nullable so it defaults to null.

Also removed the useless datafields on the "last update" fields. These are all just used to cache and throttle updates, something that should not be persisted to a map file.
2024-07-25 01:53:30 +02:00
..
ActivatableUIRequiresPowerSystem.cs Predict ActivatableUIRequiresPower (#28405) 2024-06-01 17:38:43 +02:00
ApcSystem.cs Fix bugs resulting in quantum APC visual states (#29475) 2024-07-25 01:53:30 +02:00
BatterySystem.cs Remove all obsolete BatteryComponent method calls (#25871) 2024-03-07 01:52:46 +01:00
CableMultitoolSystem.cs Revert "Revert "Replace `ResourcePath` with `ResPath` (#15308)" (#155… (#15566) 2023-04-20 20:16:01 +10:00
CableSystem.Placer.cs Code Cleanup: Purge obsolete MapManager methods (#26279) 2024-03-24 00:13:35 +01:00
CableSystem.cs Code Cleanup: Purge obsolete MapManager methods (#26279) 2024-03-24 00:13:35 +01:00
CableVisSystem.cs Atmos device performance improvements (#26493) 2024-04-07 14:14:34 +02:00
ChargerSystem.cs Replace obsolete EntityWhitelist IsValid usages (#28465) 2024-06-06 21:44:41 +02:00
ExtensionCableSystem.cs Reduced Warning Count By 130 For Full Rebuilds (#26518) 2024-04-07 14:11:06 +02:00
PowerMonitoringConsoleSystem.cs Mega Antag Refactor (#25786) 2024-05-15 19:48:32 +02:00
PowerNetConnectorSystem.cs Replace Component.OnRemove with ComponentRemove event subscriptions (#21072) 2023-10-20 15:30:20 +02:00
PowerNetSystem.cs Add CVar to disable pow3r parallel processing (#28488) 2024-06-08 20:16:21 +02:00
PowerReceiverSystem.cs Move ApcPowerReceiverComponent Powered state to shared (#28206) 2024-06-01 17:38:41 +02:00
RiggableSystem.cs Revert 'Revert 'Solution Entities'' (#23168) 2024-01-23 23:00:42 +01:00
StaticPowerSystem.cs ECS airlocks (#13500) 2023-01-17 11:44:32 -07:00