* Logging fixed + minor clean-up of ApcToggleBreaker method
* ATS is no longer targeted by BreakFlipRule
* Fixed typo
* Now uses Uid
* Now uses Uid
* Fixed look-up
* Added blacklist to BreakerFlipComponent to specify which entities shouldn't trigger the game rule
* small fix
* Cancel if APC is in unpowered list
* Also prevent re-power via re-construction
* Revert useless dependency
* Reduced event time by 10-20 seconds
* Move to ApcSystem
* Also verify game rule is active
* Empty commit
* Move station and affected checking
* Check for main station grid
* Fix format warnings
* Somehow this got duplicated
* Make GetRuleAffectingEntity() also check for BecomesStationComponent
* Make APCSystem also check for ActivegameRuleComponent
* Removed redundant checks and duplicate logic
* Add GridEventEligibleComponent with flag for PowerGridChecks
* Propagate GridEventEligibleComponent.
* Revert GridEventEligible
* Use GetLargestGrid
* Implement APC overloading
* Add power test
* Review
* Some more reviews
* Show map coordinates for test failures
* Widen column 2
* Reduce singularity beacon power consumption
* Try to get grid coordinates
* Make APC UI work correctly with multiple users
* Check access only on client, when constructing UI
* Do TODO (Thanks, Robust 236.1)
---------
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
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.
* The all-in-one hacking solution
The thinking man's lockpick
The iconic EMAG
* emagged medbay's stasis bed
* left med, emagged sec' apc
* went back to chem, emagged the dispenser
* emagged the fax while i was there
* had a donut while waiting for emag to charge
* i broke into the bridge then announced 'mandatory johnson inspection in medical'
* get system instead of dependency
* feedback
* net suggestion
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* use EnsureComp and import NetworkedComponent
---------
Co-authored-by: deltanedas <user@zenith>
Co-authored-by: deltanedas <deltanedas@laptop>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* APC construction and deconstruction
Construction action GivePrototype
* APC needs screwing + sprites
* apc framework, working construction recipe
* Energy swords hot
* APC changes
* APC construction/deconstruction
* removed comments
* Revert "Energy swords hot"
This reverts commit 75228483abb3cc6252118b319bc8949d5198362d.
* Renamed function for clarity
* Fixed the last step not showing in the construction menu
* Some fixes
* Update Content.Server/Power/EntitySystems/ApcSystem.cs
Co-authored-by: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
* Update Content.Server/Construction/Completions/GivePrototype.cs
Co-authored-by: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
* Update Resources/Prototypes/Entities/Structures/Power/apc.yml
Co-authored-by: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
* Update Resources/Prototypes/Entities/Structures/Power/apc.yml
Co-authored-by: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
* Update Content.Server/Power/Components/ApcElectronicsComponent.cs
Co-authored-by: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
* Update Content.Client/Power/APC/ApcVisualizer.cs
Co-authored-by: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
Co-authored-by: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>