Delta-v/Content.Server/Power
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
..
Commands Resolve `'EntitySystem.Get<T>()' is obsolete` in content (#27936) 2024-05-18 13:58:55 +02:00
Components Fix bugs resulting in quantum APC visual states (#29475) 2024-07-25 01:53:30 +02:00
EntitySystems Fix bugs resulting in quantum APC visual states (#29475) 2024-07-25 01:53:30 +02:00
Events Revert "add breakers to power batteries" (#17632) 2023-07-08 12:47:38 +10:00
Generation/Teg Revert "TEG can power itself when turned on" (#29434) 2024-07-25 01:46:28 +02:00
Generator Move GasMixture to shared (#27480) 2024-05-07 04:00:15 +02:00
NodeGroups Make PACMANs a little better (#24604) 2024-01-28 00:32:20 +01:00
Nodes Portable Generator Rework (#19302) 2023-08-25 11:40:42 -07:00
Pow3r Add CVar to disable pow3r parallel processing (#28488) 2024-06-08 20:16:21 +02:00
SMES Remove AllComponentsOneEntityDeleteTest (#19965) 2023-09-09 19:35:05 -05:00
PowerWireAction.cs Resolve `'EntitySystem.Get<T>()' is obsolete` in content (#27936) 2024-05-18 13:58:55 +02:00
SetBatteryPercentCommand.cs Remove all obsolete BatteryComponent method calls (#25871) 2024-03-07 01:52:46 +01:00