diff --git a/Content.Client/Administration/UI/BanList/BanListWindow.xaml.cs b/Content.Client/Administration/UI/BanList/BanListWindow.xaml.cs
index c95f8f204dd..fad55f96273 100644
--- a/Content.Client/Administration/UI/BanList/BanListWindow.xaml.cs
+++ b/Content.Client/Administration/UI/BanList/BanListWindow.xaml.cs
@@ -1,4 +1,5 @@
using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs
index dd8e3e22121..b4e9a07ef88 100644
--- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs
+++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs
@@ -11,9 +11,8 @@ using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Network;
-using Robust.Shared.Utility;
-using Robust.Shared.Timing;
using Robust.Shared.Configuration;
+using Robust.Shared.Utility;
namespace Content.Client.Administration.UI.Bwoink
{
diff --git a/Content.Client/Administration/UI/SetOutfit/SetOutfitMenu.xaml.cs b/Content.Client/Administration/UI/SetOutfit/SetOutfitMenu.xaml.cs
index a2faf208d92..7cb32b43df5 100644
--- a/Content.Client/Administration/UI/SetOutfit/SetOutfitMenu.xaml.cs
+++ b/Content.Client/Administration/UI/SetOutfit/SetOutfitMenu.xaml.cs
@@ -1,4 +1,5 @@
using System.Numerics;
+using Content.Client.UserInterface.Controls;
using Content.Shared.Roles;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
diff --git a/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs b/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs
index 273707cb6ea..27ddd51815e 100644
--- a/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs
+++ b/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs
@@ -1,4 +1,5 @@
-using Content.Shared.CrewManifest;
+using Content.Client.CrewManifest.UI;
+using Content.Shared.CrewManifest;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
diff --git a/Content.Client/Construction/UI/FlatpackCreatorMenu.xaml.cs b/Content.Client/Construction/UI/FlatpackCreatorMenu.xaml.cs
index 269694ebf9e..81410dc7e6d 100644
--- a/Content.Client/Construction/UI/FlatpackCreatorMenu.xaml.cs
+++ b/Content.Client/Construction/UI/FlatpackCreatorMenu.xaml.cs
@@ -1,5 +1,6 @@
using System.Linq;
using Content.Client.Materials;
+using Content.Client.Materials.UI;
using Content.Client.Message;
using Content.Client.UserInterface.Controls;
using Content.Shared.Construction.Components;
diff --git a/Content.Client/CrewManifest/CrewManifestUi.xaml.cs b/Content.Client/CrewManifest/CrewManifestUi.xaml.cs
index 4183c908141..f07e54eb65b 100644
--- a/Content.Client/CrewManifest/CrewManifestUi.xaml.cs
+++ b/Content.Client/CrewManifest/CrewManifestUi.xaml.cs
@@ -1,3 +1,4 @@
+using Content.Client.CrewManifest.UI;
using Content.Shared.CrewManifest;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
diff --git a/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs b/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs
index 14709f8b1f0..619cac68391 100644
--- a/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs
+++ b/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs
@@ -1,5 +1,6 @@
using System.Numerics;
using Content.Client.UserInterface.Controls;
+using Prometheus;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
diff --git a/Content.Client/Lobby/UI/LobbyGui.xaml.cs b/Content.Client/Lobby/UI/LobbyGui.xaml.cs
index 6471edb6f37..81230130a1d 100644
--- a/Content.Client/Lobby/UI/LobbyGui.xaml.cs
+++ b/Content.Client/Lobby/UI/LobbyGui.xaml.cs
@@ -2,6 +2,7 @@ using Content.Client.Message;
using Content.Client.UserInterface.Systems.EscapeMenu;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
+using Robust.Client.State;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
diff --git a/Content.Client/MachineLinking/UI/SignalTimerWindow.xaml.cs b/Content.Client/MachineLinking/UI/SignalTimerWindow.xaml.cs
index 6133abfcb70..441ca9ea365 100644
--- a/Content.Client/MachineLinking/UI/SignalTimerWindow.xaml.cs
+++ b/Content.Client/MachineLinking/UI/SignalTimerWindow.xaml.cs
@@ -3,6 +3,7 @@ using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Timing;
using Content.Client.TextScreen;
+using Robust.Client.UserInterface.Controls;
namespace Content.Client.MachineLinking.UI;
diff --git a/Content.Client/Options/UI/OptionsMenu.xaml.cs b/Content.Client/Options/UI/OptionsMenu.xaml.cs
index 61037f4e4af..b749d1f234d 100644
--- a/Content.Client/Options/UI/OptionsMenu.xaml.cs
+++ b/Content.Client/Options/UI/OptionsMenu.xaml.cs
@@ -1,3 +1,4 @@
+using Content.Client.Options.UI.Tabs;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
diff --git a/Content.Client/Power/EntitySystems/PowerReceiverSystem.cs b/Content.Client/Power/EntitySystems/PowerReceiverSystem.cs
index 61e20f751ca..ebf6c18c953 100644
--- a/Content.Client/Power/EntitySystems/PowerReceiverSystem.cs
+++ b/Content.Client/Power/EntitySystems/PowerReceiverSystem.cs
@@ -1,3 +1,4 @@
+using System.Diagnostics.CodeAnalysis;
using Content.Client.Power.Components;
using Content.Shared.Power.Components;
using Content.Shared.Power.EntitySystems;
@@ -27,4 +28,16 @@ public sealed class PowerReceiverSystem : SharedPowerReceiverSystem
component.Powered = state.Powered;
}
+
+ public override bool ResolveApc(EntityUid entity, [NotNullWhen(true)] ref SharedApcPowerReceiverComponent? component)
+ {
+ if (component != null)
+ return true;
+
+ if (!TryComp(entity, out ApcPowerReceiverComponent? receiver))
+ return false;
+
+ component = receiver;
+ return true;
+ }
}
diff --git a/Content.Client/Power/Generator/GeneratorWindow.xaml.cs b/Content.Client/Power/Generator/GeneratorWindow.xaml.cs
index e975e5d466e..161482e0905 100644
--- a/Content.Client/Power/Generator/GeneratorWindow.xaml.cs
+++ b/Content.Client/Power/Generator/GeneratorWindow.xaml.cs
@@ -3,6 +3,7 @@ using Content.Client.UserInterface.Controls;
using Content.Shared.Power.Generator;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Network;
namespace Content.Client.Power.Generator;
diff --git a/Content.Client/Radio/Ui/IntercomMenu.xaml.cs b/Content.Client/Radio/Ui/IntercomMenu.xaml.cs
index 20d2e4a3e54..f66b3db000e 100644
--- a/Content.Client/Radio/Ui/IntercomMenu.xaml.cs
+++ b/Content.Client/Radio/Ui/IntercomMenu.xaml.cs
@@ -1,3 +1,4 @@
+using System.Threading.Channels;
using Content.Client.UserInterface.Controls;
using Content.Shared.Radio.Components;
using Robust.Client.AutoGenerated;
diff --git a/Content.Client/StationRecords/GeneralRecord.xaml.cs b/Content.Client/StationRecords/GeneralRecord.xaml.cs
index 6a2622fba9e..e84c2dc0982 100644
--- a/Content.Client/StationRecords/GeneralRecord.xaml.cs
+++ b/Content.Client/StationRecords/GeneralRecord.xaml.cs
@@ -2,6 +2,7 @@ using Content.Shared.StationRecords;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Enums;
namespace Content.Client.StationRecords;
diff --git a/Content.Client/Storage/Components/StorageContainerVisualsComponent.cs b/Content.Client/Storage/Components/StorageContainerVisualsComponent.cs
index 9f07867da85..9ef6c65e890 100644
--- a/Content.Client/Storage/Components/StorageContainerVisualsComponent.cs
+++ b/Content.Client/Storage/Components/StorageContainerVisualsComponent.cs
@@ -1,4 +1,5 @@
using Content.Client.Chemistry.Visualizers;
+using Content.Shared.Chemistry.Components;
namespace Content.Client.Storage.Components;
diff --git a/Content.Client/Xenoarchaeology/Ui/AnalysisConsoleMenu.xaml.cs b/Content.Client/Xenoarchaeology/Ui/AnalysisConsoleMenu.xaml.cs
index 2890bb3dbf7..2723db1efbf 100644
--- a/Content.Client/Xenoarchaeology/Ui/AnalysisConsoleMenu.xaml.cs
+++ b/Content.Client/Xenoarchaeology/Ui/AnalysisConsoleMenu.xaml.cs
@@ -1,6 +1,7 @@
using Content.Client.Stylesheets;
using Content.Client.UserInterface.Controls;
using Content.Shared.Xenoarchaeology.Equipment;
+using Microsoft.VisualBasic;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface.Controls;
diff --git a/Content.Server/AlertLevel/AlertLevelDisplaySystem.cs b/Content.Server/AlertLevel/AlertLevelDisplaySystem.cs
index 4f2108748b8..3dd216c5dce 100644
--- a/Content.Server/AlertLevel/AlertLevelDisplaySystem.cs
+++ b/Content.Server/AlertLevel/AlertLevelDisplaySystem.cs
@@ -1,6 +1,7 @@
using Content.Server.Power.Components;
using Content.Server.Station.Systems;
using Content.Shared.AlertLevel;
+using Content.Shared.Power;
namespace Content.Server.AlertLevel;
diff --git a/Content.Server/Ame/EntitySystems/AmeControllerSystem.cs b/Content.Server/Ame/EntitySystems/AmeControllerSystem.cs
index bac2648307c..bc3b57bd5a3 100644
--- a/Content.Server/Ame/EntitySystems/AmeControllerSystem.cs
+++ b/Content.Server/Ame/EntitySystems/AmeControllerSystem.cs
@@ -10,6 +10,7 @@ using Content.Shared.Ame.Components;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Database;
using Content.Shared.Mind.Components;
+using Content.Shared.Power;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
diff --git a/Content.Server/Anomaly/AnomalySynchronizerSystem.cs b/Content.Server/Anomaly/AnomalySynchronizerSystem.cs
index 9f18a412925..d4a3a0d5faa 100644
--- a/Content.Server/Anomaly/AnomalySynchronizerSystem.cs
+++ b/Content.Server/Anomaly/AnomalySynchronizerSystem.cs
@@ -7,6 +7,7 @@ using Content.Shared.Anomaly.Components;
using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Popups;
+using Content.Shared.Power;
using Robust.Shared.Audio.Systems;
using Content.Shared.Verbs;
diff --git a/Content.Server/Anomaly/AnomalySystem.Generator.cs b/Content.Server/Anomaly/AnomalySystem.Generator.cs
index 056a985cbe2..6eb84b94418 100644
--- a/Content.Server/Anomaly/AnomalySystem.Generator.cs
+++ b/Content.Server/Anomaly/AnomalySystem.Generator.cs
@@ -13,6 +13,7 @@ using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Map;
using System.Numerics;
+using Content.Shared.Power;
using Robust.Server.GameObjects;
namespace Content.Server.Anomaly;
diff --git a/Content.Server/Arcade/BlockGame/BlockGameArcadeSystem.cs b/Content.Server/Arcade/BlockGame/BlockGameArcadeSystem.cs
index 561cad8d7ee..b0bf3895092 100644
--- a/Content.Server/Arcade/BlockGame/BlockGameArcadeSystem.cs
+++ b/Content.Server/Arcade/BlockGame/BlockGameArcadeSystem.cs
@@ -3,6 +3,7 @@ using Content.Shared.UserInterface;
using Content.Server.Advertise;
using Content.Server.Advertise.Components;
using Content.Shared.Arcade;
+using Content.Shared.Power;
using Robust.Server.GameObjects;
using Robust.Shared.Player;
diff --git a/Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeSystem.cs b/Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeSystem.cs
index f7758f11f17..b359a13bd12 100644
--- a/Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeSystem.cs
+++ b/Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeSystem.cs
@@ -2,6 +2,7 @@ using Content.Server.Power.Components;
using Content.Shared.UserInterface;
using Content.Server.Advertise;
using Content.Server.Advertise.Components;
+using Content.Shared.Power;
using static Content.Shared.Arcade.SharedSpaceVillainArcadeComponent;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
diff --git a/Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs b/Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs
index 7212865baaf..eebac18501a 100644
--- a/Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs
+++ b/Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs
@@ -18,6 +18,7 @@ using Content.Shared.DeviceLinking;
using Content.Shared.DeviceNetwork;
using Content.Shared.DeviceNetwork.Systems;
using Content.Shared.Interaction;
+using Content.Shared.Power;
using Content.Shared.Wires;
using Robust.Server.GameObjects;
using Robust.Shared.Player;
diff --git a/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs b/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs
index 1b3b11068c5..81a3968e6ff 100644
--- a/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs
+++ b/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs
@@ -7,6 +7,7 @@ using Content.Server.DeviceNetwork.Systems;
using Content.Server.Power.Components;
using Content.Shared.Atmos.Monitor;
using Content.Shared.DeviceNetwork;
+using Content.Shared.Power;
using Content.Shared.Tag;
using Robust.Server.Audio;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs b/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs
index c1a5256fdd5..2c9a3587559 100644
--- a/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs
+++ b/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs
@@ -9,6 +9,7 @@ using Content.Server.Power.EntitySystems;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Monitor;
using Content.Shared.DeviceNetwork;
+using Content.Shared.Power;
using Content.Shared.Tag;
using Robust.Shared.Prototypes;
diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs
index 2859c7f19d0..dbbbf2d0083 100644
--- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs
+++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs
@@ -18,6 +18,7 @@ using Content.Shared.Atmos.Visuals;
using Content.Shared.Audio;
using Content.Shared.DeviceNetwork;
using Content.Shared.Examine;
+using Content.Shared.Power;
using Content.Shared.Tools.Systems;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentScrubberSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentScrubberSystem.cs
index b27689ed586..a35cf6c2e30 100644
--- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentScrubberSystem.cs
+++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentScrubberSystem.cs
@@ -16,6 +16,7 @@ using Content.Shared.Atmos.Monitor;
using Content.Shared.Atmos.Piping.Unary.Components;
using Content.Shared.Audio;
using Content.Shared.DeviceNetwork;
+using Content.Shared.Power;
using Content.Shared.Tools.Systems;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Atmos/Portable/PortableScrubberSystem.cs b/Content.Server/Atmos/Portable/PortableScrubberSystem.cs
index bc5db2e22cb..b1b6ed36789 100644
--- a/Content.Server/Atmos/Portable/PortableScrubberSystem.cs
+++ b/Content.Server/Atmos/Portable/PortableScrubberSystem.cs
@@ -15,6 +15,7 @@ using Content.Server.Administration.Logs;
using Content.Server.NodeContainer.EntitySystems;
using Content.Shared.Atmos;
using Content.Shared.Database;
+using Content.Shared.Power;
namespace Content.Server.Atmos.Portable
{
diff --git a/Content.Server/Atmos/Portable/SpaceHeaterSystem.cs b/Content.Server/Atmos/Portable/SpaceHeaterSystem.cs
index cbf63f54043..36ef59e743b 100644
--- a/Content.Server/Atmos/Portable/SpaceHeaterSystem.cs
+++ b/Content.Server/Atmos/Portable/SpaceHeaterSystem.cs
@@ -6,6 +6,7 @@ using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared.Atmos.Piping.Portable.Components;
using Content.Shared.Atmos.Visuals;
+using Content.Shared.Power;
using Content.Shared.UserInterface;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Audio/AmbientSoundSystem.cs b/Content.Server/Audio/AmbientSoundSystem.cs
index e78970d1243..1f4abf34f77 100644
--- a/Content.Server/Audio/AmbientSoundSystem.cs
+++ b/Content.Server/Audio/AmbientSoundSystem.cs
@@ -2,6 +2,7 @@ using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared.Audio;
using Content.Shared.Mobs;
+using Content.Shared.Power;
namespace Content.Server.Audio;
diff --git a/Content.Server/Audio/Jukebox/JukeboxSystem.cs b/Content.Server/Audio/Jukebox/JukeboxSystem.cs
index cc9235e3d7a..3535f6b2382 100644
--- a/Content.Server/Audio/Jukebox/JukeboxSystem.cs
+++ b/Content.Server/Audio/Jukebox/JukeboxSystem.cs
@@ -1,6 +1,7 @@
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared.Audio.Jukebox;
+using Content.Shared.Power;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Components;
diff --git a/Content.Server/Bed/BedSystem.cs b/Content.Server/Bed/BedSystem.cs
index a6b61da591f..2cc8085e725 100644
--- a/Content.Server/Bed/BedSystem.cs
+++ b/Content.Server/Bed/BedSystem.cs
@@ -10,6 +10,7 @@ using Content.Shared.Buckle.Components;
using Content.Shared.Damage;
using Content.Shared.Emag.Systems;
using Content.Shared.Mobs.Systems;
+using Content.Shared.Power;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
diff --git a/Content.Server/Buckle/Systems/AntiRotOnBuckleSystem.cs b/Content.Server/Buckle/Systems/AntiRotOnBuckleSystem.cs
index 4458b020a11..6f356baf073 100644
--- a/Content.Server/Buckle/Systems/AntiRotOnBuckleSystem.cs
+++ b/Content.Server/Buckle/Systems/AntiRotOnBuckleSystem.cs
@@ -1,6 +1,7 @@
using Content.Server.Power.Components;
using Content.Shared.Atmos.Rotting;
using Content.Shared.Buckle.Components;
+using Content.Shared.Power;
namespace Content.Server.Buckle.Systems;
diff --git a/Content.Server/Cargo/Systems/CargoSystem.Telepad.cs b/Content.Server/Cargo/Systems/CargoSystem.Telepad.cs
index f83ec1a5123..5b699740776 100644
--- a/Content.Server/Cargo/Systems/CargoSystem.Telepad.cs
+++ b/Content.Server/Cargo/Systems/CargoSystem.Telepad.cs
@@ -6,6 +6,7 @@ using Content.Server.Station.Components;
using Content.Shared.Cargo;
using Content.Shared.Cargo.Components;
using Content.Shared.DeviceLinking;
+using Content.Shared.Power;
using Robust.Shared.Audio;
using Robust.Shared.Random;
using Robust.Shared.Utility;
diff --git a/Content.Server/Chemistry/EntitySystems/SolutionContainerMixerSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionContainerMixerSystem.cs
index a942d34e7a8..45a85010b19 100644
--- a/Content.Server/Chemistry/EntitySystems/SolutionContainerMixerSystem.cs
+++ b/Content.Server/Chemistry/EntitySystems/SolutionContainerMixerSystem.cs
@@ -2,6 +2,7 @@ using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
+using Content.Shared.Power;
namespace Content.Server.Chemistry.EntitySystems;
diff --git a/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs
index 6e6373e10bf..cd39d20b753 100644
--- a/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs
+++ b/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs
@@ -5,6 +5,7 @@ using Content.Server.Power.EntitySystems;
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Placeable;
+using Content.Shared.Power;
namespace Content.Server.Chemistry.EntitySystems;
diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs
index 950a6599a89..050e2b7f064 100644
--- a/Content.Server/Cloning/CloningConsoleSystem.cs
+++ b/Content.Server/Cloning/CloningConsoleSystem.cs
@@ -15,6 +15,7 @@ using Content.Shared.IdentityManagement;
using Content.Shared.Mind;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
+using Content.Shared.Power;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Server.Player;
diff --git a/Content.Server/Construction/ConstructionSystem.Computer.cs b/Content.Server/Construction/ConstructionSystem.Computer.cs
index 0685b08f4ff..6951d44b4d5 100644
--- a/Content.Server/Construction/ConstructionSystem.Computer.cs
+++ b/Content.Server/Construction/ConstructionSystem.Computer.cs
@@ -1,6 +1,7 @@
using Content.Server.Construction.Components;
using Content.Server.Power.Components;
using Content.Shared.Computer;
+using Content.Shared.Power;
using Robust.Shared.Containers;
namespace Content.Server.Construction;
diff --git a/Content.Server/Construction/FlatpackSystem.cs b/Content.Server/Construction/FlatpackSystem.cs
index af2132723cd..11303e7f2ee 100644
--- a/Content.Server/Construction/FlatpackSystem.cs
+++ b/Content.Server/Construction/FlatpackSystem.cs
@@ -4,6 +4,7 @@ using Content.Server.Power.EntitySystems;
using Content.Shared.Construction;
using Content.Shared.Construction.Components;
using Content.Shared.Containers.ItemSlots;
+using Content.Shared.Power;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
diff --git a/Content.Server/DeviceLinking/Components/PowerSensorComponent.cs b/Content.Server/DeviceLinking/Components/PowerSensorComponent.cs
index d9599546aea..b67a2fcd950 100644
--- a/Content.Server/DeviceLinking/Components/PowerSensorComponent.cs
+++ b/Content.Server/DeviceLinking/Components/PowerSensorComponent.cs
@@ -1,5 +1,6 @@
using Content.Server.DeviceLinking.Systems;
using Content.Shared.DeviceLinking;
+using Content.Shared.Power.Generator;
using Content.Shared.Tools;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
diff --git a/Content.Server/DeviceNetwork/Systems/DeviceNetworkRequiresPowerSystem.cs b/Content.Server/DeviceNetwork/Systems/DeviceNetworkRequiresPowerSystem.cs
index 6e7bd255c5d..f47a5df8ac4 100644
--- a/Content.Server/DeviceNetwork/Systems/DeviceNetworkRequiresPowerSystem.cs
+++ b/Content.Server/DeviceNetwork/Systems/DeviceNetworkRequiresPowerSystem.cs
@@ -1,6 +1,7 @@
using Content.Server.DeviceNetwork.Components;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
+using Content.Shared.Power.EntitySystems;
namespace Content.Server.DeviceNetwork.Systems;
diff --git a/Content.Server/DeviceNetwork/Systems/SingletonDeviceNetServerSystem.cs b/Content.Server/DeviceNetwork/Systems/SingletonDeviceNetServerSystem.cs
index cdc083feacd..d189afc0a02 100644
--- a/Content.Server/DeviceNetwork/Systems/SingletonDeviceNetServerSystem.cs
+++ b/Content.Server/DeviceNetwork/Systems/SingletonDeviceNetServerSystem.cs
@@ -3,6 +3,7 @@ using Content.Server.DeviceNetwork.Components;
using Content.Server.Medical.CrewMonitoring;
using Content.Server.Power.Components;
using Content.Server.Station.Systems;
+using Content.Shared.Power;
namespace Content.Server.DeviceNetwork.Systems;
diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs
index 7726acfc93a..f1d182fc668 100644
--- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs
+++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs
@@ -25,6 +25,7 @@ using Content.Shared.Interaction;
using Content.Shared.Item;
using Content.Shared.Movement.Events;
using Content.Shared.Popups;
+using Content.Shared.Power;
using Content.Shared.Verbs;
using Robust.Server.Audio;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Doors/Systems/AirlockSystem.cs b/Content.Server/Doors/Systems/AirlockSystem.cs
index fd5d3a9ceba..e9f1db13ffb 100644
--- a/Content.Server/Doors/Systems/AirlockSystem.cs
+++ b/Content.Server/Doors/Systems/AirlockSystem.cs
@@ -4,6 +4,7 @@ using Content.Server.Wires;
using Content.Shared.Doors.Components;
using Content.Shared.Doors.Systems;
using Content.Shared.Interaction;
+using Content.Shared.Power;
using Content.Shared.Wires;
using Robust.Shared.Player;
diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs
index 5968e445c19..292f8ec8e97 100644
--- a/Content.Server/Doors/Systems/DoorSystem.cs
+++ b/Content.Server/Doors/Systems/DoorSystem.cs
@@ -1,9 +1,9 @@
using Content.Server.Access;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
-using Content.Server.Power.Components;
using Content.Shared.Doors.Components;
using Content.Shared.Doors.Systems;
+using Content.Shared.Power;
using Robust.Shared.Physics.Components;
namespace Content.Server.Doors.Systems;
diff --git a/Content.Server/Doors/Systems/FirelockSystem.cs b/Content.Server/Doors/Systems/FirelockSystem.cs
index 87e5887c422..6bb1972b6ec 100644
--- a/Content.Server/Doors/Systems/FirelockSystem.cs
+++ b/Content.Server/Doors/Systems/FirelockSystem.cs
@@ -8,6 +8,7 @@ using Content.Shared.Atmos;
using Content.Shared.Atmos.Monitor;
using Content.Shared.Doors.Components;
using Content.Shared.Doors.Systems;
+using Content.Shared.Power;
using Robust.Server.GameObjects;
using Robust.Shared.Map.Components;
diff --git a/Content.Server/Fax/FaxSystem.cs b/Content.Server/Fax/FaxSystem.cs
index 18852ac7555..a43d0171e60 100644
--- a/Content.Server/Fax/FaxSystem.cs
+++ b/Content.Server/Fax/FaxSystem.cs
@@ -29,6 +29,7 @@ using Robust.Shared.Containers;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Content.Shared.NameModifier.Components;
+using Content.Shared.Power;
namespace Content.Server.Fax;
diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
index b4023bbdb9f..f7e0c6fde22 100644
--- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
+++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
@@ -21,6 +21,7 @@ using Robust.Shared.Timing;
using System.Linq;
using Content.Server.Jittering;
using Content.Shared.Jittering;
+using Content.Shared.Power;
namespace Content.Server.Kitchen.EntitySystems
{
diff --git a/Content.Server/Lathe/LatheSystem.cs b/Content.Server/Lathe/LatheSystem.cs
index 6d7d4e45331..18f246dcef4 100644
--- a/Content.Server/Lathe/LatheSystem.cs
+++ b/Content.Server/Lathe/LatheSystem.cs
@@ -19,6 +19,7 @@ using Content.Shared.Emag.Components;
using Content.Shared.Examine;
using Content.Shared.Lathe;
using Content.Shared.Materials;
+using Content.Shared.Power;
using Content.Shared.ReagentSpeed;
using Content.Shared.Research.Components;
using Content.Shared.Research.Prototypes;
diff --git a/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs b/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs
index b6810aa33be..6bd5750460a 100644
--- a/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs
+++ b/Content.Server/Light/EntitySystems/EmergencyLightSystem.cs
@@ -7,6 +7,7 @@ using Content.Server.Station.Systems;
using Content.Shared.Examine;
using Content.Shared.Light;
using Content.Shared.Light.Components;
+using Content.Shared.Power;
using Content.Shared.Station.Components;
using Robust.Server.GameObjects;
using Color = Robust.Shared.Maths.Color;
diff --git a/Content.Server/Light/EntitySystems/LitOnPoweredSystem.cs b/Content.Server/Light/EntitySystems/LitOnPoweredSystem.cs
index 752fb8f5fe6..3c5f7eaecb2 100644
--- a/Content.Server/Light/EntitySystems/LitOnPoweredSystem.cs
+++ b/Content.Server/Light/EntitySystems/LitOnPoweredSystem.cs
@@ -1,6 +1,8 @@
using Content.Server.Light.Components;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
+using Content.Shared.Power;
+using Content.Shared.Power.Components;
namespace Content.Server.Light.EntitySystems
{
diff --git a/Content.Server/Light/EntitySystems/PoweredLightSystem.cs b/Content.Server/Light/EntitySystems/PoweredLightSystem.cs
index 33b7ce0782f..6e1363dee2a 100644
--- a/Content.Server/Light/EntitySystems/PoweredLightSystem.cs
+++ b/Content.Server/Light/EntitySystems/PoweredLightSystem.cs
@@ -25,6 +25,8 @@ using Robust.Shared.Timing;
using Robust.Shared.Audio.Systems;
using Content.Shared.Damage.Systems;
using Content.Shared.Damage.Components;
+using Content.Shared.Power;
+using Content.Shared.Power.Components;
namespace Content.Server.Light.EntitySystems
{
diff --git a/Content.Server/Materials/MaterialReclaimerSystem.cs b/Content.Server/Materials/MaterialReclaimerSystem.cs
index e66c27343c8..b02212844b0 100644
--- a/Content.Server/Materials/MaterialReclaimerSystem.cs
+++ b/Content.Server/Materials/MaterialReclaimerSystem.cs
@@ -24,6 +24,7 @@ using Content.Server.Repairable;
using Content.Shared.Database;
using Content.Shared.Destructible;
using Content.Shared.Emag.Components;
+using Content.Shared.Power;
using Robust.Shared.Prototypes;
namespace Content.Server.Materials;
diff --git a/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs b/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs
index c5beed718ed..868e6d99f25 100644
--- a/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs
+++ b/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs
@@ -24,6 +24,7 @@ using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Nutrition.Components;
using Content.Shared.Popups;
+using Content.Shared.Power;
using Content.Shared.Throwing;
using Robust.Server.Player;
using Robust.Shared.Audio.Systems;
diff --git a/Content.Server/Medical/CryoPodSystem.cs b/Content.Server/Medical/CryoPodSystem.cs
index 8d54fc6dd95..2c9f58616a2 100644
--- a/Content.Server/Medical/CryoPodSystem.cs
+++ b/Content.Server/Medical/CryoPodSystem.cs
@@ -29,6 +29,7 @@ using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Medical.Cryogenics;
using Content.Shared.MedicalScanner;
+using Content.Shared.Power;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
diff --git a/Content.Server/Nutrition/EntitySystems/FatExtractorSystem.cs b/Content.Server/Nutrition/EntitySystems/FatExtractorSystem.cs
index 180e40d1e42..c91a6f795b2 100644
--- a/Content.Server/Nutrition/EntitySystems/FatExtractorSystem.cs
+++ b/Content.Server/Nutrition/EntitySystems/FatExtractorSystem.cs
@@ -8,6 +8,7 @@ using Content.Shared.Emag.Components;
using Content.Shared.Emag.Systems;
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
+using Content.Shared.Power;
using Content.Shared.Storage.Components;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Timing;
diff --git a/Content.Server/Paper/PaperRandomStoryComponent.cs b/Content.Server/Paper/PaperRandomStoryComponent.cs
index b8e07f0ee81..7b6624ac85d 100644
--- a/Content.Server/Paper/PaperRandomStoryComponent.cs
+++ b/Content.Server/Paper/PaperRandomStoryComponent.cs
@@ -1,3 +1,4 @@
+using Content.Shared.Paper;
using Content.Shared.StoryGen;
using Robust.Shared.Prototypes;
diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs
index 4d39a5ce305..17943c1c987 100644
--- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs
+++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs
@@ -6,6 +6,7 @@ using Robust.Shared.Utility;
using System.Diagnostics;
using Content.Server.Administration.Managers;
using Content.Shared.CCVar;
+using Content.Shared.Power;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Timing;
diff --git a/Content.Server/Physics/Controllers/ConveyorController.cs b/Content.Server/Physics/Controllers/ConveyorController.cs
index e2788fa54cf..3c0db7f85a3 100644
--- a/Content.Server/Physics/Controllers/ConveyorController.cs
+++ b/Content.Server/Physics/Controllers/ConveyorController.cs
@@ -7,6 +7,7 @@ using Content.Shared.Destructible;
using Content.Shared.Maps;
using Content.Shared.Physics;
using Content.Shared.Physics.Controllers;
+using Content.Shared.Power;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Physics.Components;
diff --git a/Content.Server/Power/Components/ApcPowerReceiverComponent.cs b/Content.Server/Power/Components/ApcPowerReceiverComponent.cs
index 9a68e2aabb8..ebb3c6b42f3 100644
--- a/Content.Server/Power/Components/ApcPowerReceiverComponent.cs
+++ b/Content.Server/Power/Components/ApcPowerReceiverComponent.cs
@@ -59,11 +59,4 @@ namespace Content.Server.Power.Components
public float PowerReceived => NetworkLoad.ReceivingPower;
}
-
- ///
- /// Raised whenever an ApcPowerReceiver becomes powered / unpowered.
- /// Does nothing on the client.
- ///
- [ByRefEvent]
- public readonly record struct PowerChangedEvent(bool Powered, float ReceivingPower);
}
diff --git a/Content.Server/Power/Components/CableComponent.cs b/Content.Server/Power/Components/CableComponent.cs
index a2a02a60f68..7398bc0616e 100644
--- a/Content.Server/Power/Components/CableComponent.cs
+++ b/Content.Server/Power/Components/CableComponent.cs
@@ -4,6 +4,7 @@ using Content.Shared.Tools;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using System.Diagnostics.Tracing;
+using Content.Shared.Tools.Systems;
namespace Content.Server.Power.Components;
@@ -14,11 +15,11 @@ namespace Content.Server.Power.Components;
[Access(typeof(CableSystem))]
public sealed partial class CableComponent : Component
{
- [DataField("cableDroppedOnCutPrototype", customTypeSerializer: typeof(PrototypeIdSerializer))]
- public string CableDroppedOnCutPrototype = "CableHVStack1";
+ [DataField]
+ public EntProtoId CableDroppedOnCutPrototype = "CableHVStack1";
- [DataField("cuttingQuality", customTypeSerializer:typeof(PrototypeIdSerializer))]
- public string CuttingQuality = "Cutting";
+ [DataField]
+ public ProtoId CuttingQuality = SharedToolSystem.CutQuality;
///
/// Checked by to determine if there is
diff --git a/Content.Server/Power/EntitySystems/ActivatableUIRequiresPowerSystem.cs b/Content.Server/Power/EntitySystems/ActivatableUIRequiresPowerSystem.cs
index 11f35634b20..9fd824a3c49 100644
--- a/Content.Server/Power/EntitySystems/ActivatableUIRequiresPowerSystem.cs
+++ b/Content.Server/Power/EntitySystems/ActivatableUIRequiresPowerSystem.cs
@@ -1,4 +1,5 @@
using Content.Server.Power.Components;
+using Content.Shared.Power;
using Content.Shared.Power.Components;
using Content.Shared.Power.EntitySystems;
using Content.Shared.UserInterface;
diff --git a/Content.Server/Power/EntitySystems/CableMultitoolSystem.cs b/Content.Server/Power/EntitySystems/CableMultitoolSystem.cs
index 15b967bb1d5..4a63be894ef 100644
--- a/Content.Server/Power/EntitySystems/CableMultitoolSystem.cs
+++ b/Content.Server/Power/EntitySystems/CableMultitoolSystem.cs
@@ -4,6 +4,7 @@ using Content.Server.Power.NodeGroups;
using Content.Server.Tools;
using Content.Shared.Examine;
using Content.Shared.Interaction;
+using Content.Shared.Tools.Systems;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Shared.Utility;
@@ -27,7 +28,7 @@ namespace Content.Server.Power.EntitySystems
private void OnAfterInteractUsing(EntityUid uid, CableComponent component, AfterInteractUsingEvent args)
{
- if (args.Handled || args.Target == null || !args.CanReach || !_toolSystem.HasQuality(args.Used, "Pulsing"))
+ if (args.Handled || args.Target == null || !args.CanReach || !_toolSystem.HasQuality(args.Used, SharedToolSystem.PulseQuality))
return;
var markup = FormattedMessage.FromMarkup(GenerateCableMarkup(uid));
@@ -45,7 +46,7 @@ namespace Content.Server.Power.EntitySystems
// Pulsing is hardcoded here because I don't think it needs to be more complex than that right now.
// Update if I'm wrong.
- var enabled = held != null && _toolSystem.HasQuality(held.Value, "Pulsing");
+ var enabled = held != null && _toolSystem.HasQuality(held.Value, SharedToolSystem.PulseQuality);
var verb = new ExamineVerb
{
Disabled = !enabled,
diff --git a/Content.Server/Power/EntitySystems/ChargerSystem.cs b/Content.Server/Power/EntitySystems/ChargerSystem.cs
index 4e2543d2a70..df7bd2a54f7 100644
--- a/Content.Server/Power/EntitySystems/ChargerSystem.cs
+++ b/Content.Server/Power/EntitySystems/ChargerSystem.cs
@@ -8,6 +8,7 @@ using Content.Shared.Emp;
using JetBrains.Annotations;
using Robust.Shared.Containers;
using System.Diagnostics.CodeAnalysis;
+using Content.Shared.Power.Components;
using Content.Shared.Storage.Components;
using Robust.Server.Containers;
using Content.Shared.Whitelist;
diff --git a/Content.Server/Power/EntitySystems/PowerNetSystem.cs b/Content.Server/Power/EntitySystems/PowerNetSystem.cs
index a7098649cef..9ce48141396 100644
--- a/Content.Server/Power/EntitySystems/PowerNetSystem.cs
+++ b/Content.Server/Power/EntitySystems/PowerNetSystem.cs
@@ -5,6 +5,7 @@ using Content.Server.Power.NodeGroups;
using Content.Server.Power.Pow3r;
using Content.Shared.CCVar;
using Content.Shared.Power;
+using Content.Shared.Power.Components;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.Configuration;
diff --git a/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs b/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs
index 9b15bdfd287..38d7376e547 100644
--- a/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs
+++ b/Content.Server/Power/EntitySystems/PowerReceiverSystem.cs
@@ -1,3 +1,4 @@
+using System.Diagnostics.CodeAnalysis;
using Content.Server.Administration.Logs;
using Content.Server.Administration.Managers;
using Content.Server.Power.Components;
@@ -197,5 +198,17 @@ namespace Content.Server.Power.EntitySystems
{
comp.Load = load;
}
+
+ public override bool ResolveApc(EntityUid entity, [NotNullWhen(true)] ref SharedApcPowerReceiverComponent? component)
+ {
+ if (component != null)
+ return true;
+
+ if (!TryComp(entity, out ApcPowerReceiverComponent? receiver))
+ return false;
+
+ component = receiver;
+ return true;
+ }
}
}
diff --git a/Content.Server/Power/Generation/Teg/TegSystem.cs b/Content.Server/Power/Generation/Teg/TegSystem.cs
index 02412ca5fb5..edf0693954c 100644
--- a/Content.Server/Power/Generation/Teg/TegSystem.cs
+++ b/Content.Server/Power/Generation/Teg/TegSystem.cs
@@ -10,6 +10,8 @@ using Content.Server.Power.Components;
using Content.Shared.Atmos;
using Content.Shared.DeviceNetwork;
using Content.Shared.Examine;
+using Content.Shared.Power;
+using Content.Shared.Power.Components;
using Content.Shared.Power.Generation.Teg;
using Content.Shared.Rounding;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Power/Generator/GasPowerReceiverSystem.cs b/Content.Server/Power/Generator/GasPowerReceiverSystem.cs
index 5f79906c995..5a1bd31a15c 100644
--- a/Content.Server/Power/Generator/GasPowerReceiverSystem.cs
+++ b/Content.Server/Power/Generator/GasPowerReceiverSystem.cs
@@ -5,6 +5,8 @@ using Content.Server.NodeContainer.EntitySystems;
using Content.Server.NodeContainer.Nodes;
using Content.Server.Power.Components;
using Content.Shared.Atmos;
+using Content.Shared.Power;
+using Content.Shared.Power.Components;
namespace Content.Server.Power.Generator;
diff --git a/Content.Server/Power/Generator/GeneratorSignalControlComponent.cs b/Content.Server/Power/Generator/GeneratorSignalControlComponent.cs
index f16a09eae37..19ae0bd6876 100644
--- a/Content.Server/Power/Generator/GeneratorSignalControlComponent.cs
+++ b/Content.Server/Power/Generator/GeneratorSignalControlComponent.cs
@@ -1,4 +1,5 @@
using Content.Shared.DeviceLinking;
+using Content.Shared.Power.Generator;
using Robust.Shared.Prototypes;
namespace Content.Server.Power.Generator;
diff --git a/Content.Server/Radio/EntitySystems/RadioDeviceSystem.cs b/Content.Server/Radio/EntitySystems/RadioDeviceSystem.cs
index 1258e0b8c7e..c977fbc0489 100644
--- a/Content.Server/Radio/EntitySystems/RadioDeviceSystem.cs
+++ b/Content.Server/Radio/EntitySystems/RadioDeviceSystem.cs
@@ -9,6 +9,7 @@ using Content.Server.Speech;
using Content.Server.Speech.Components;
using Content.Shared.Examine;
using Content.Shared.Interaction;
+using Content.Shared.Power;
using Content.Shared.Radio;
using Content.Shared.Radio.Components;
using Robust.Shared.Prototypes;
diff --git a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
index 00a913aad86..81a2b29beb4 100644
--- a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
+++ b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
@@ -12,6 +12,7 @@ using Content.Shared.Shuttles.Events;
using Content.Shared.Shuttles.Systems;
using Content.Shared.Tag;
using Content.Shared.Movement.Systems;
+using Content.Shared.Power;
using Content.Shared.Shuttles.UI.MapObjects;
using Content.Shared.Timing;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Shuttles/Systems/ThrusterSystem.cs b/Content.Server/Shuttles/Systems/ThrusterSystem.cs
index fd149630814..af780df44af 100644
--- a/Content.Server/Shuttles/Systems/ThrusterSystem.cs
+++ b/Content.Server/Shuttles/Systems/ThrusterSystem.cs
@@ -19,6 +19,7 @@ using Robust.Shared.Physics.Systems;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Content.Shared.Localizations;
+using Content.Shared.Power;
namespace Content.Server.Shuttles.Systems;
diff --git a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs
index a9763b64d90..1ada60e1d64 100644
--- a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs
+++ b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs
@@ -11,6 +11,7 @@ using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Lock;
using Content.Shared.Popups;
+using Content.Shared.Power;
using Content.Shared.Projectiles;
using Content.Shared.Singularity.Components;
using Content.Shared.Singularity.EntitySystems;
diff --git a/Content.Server/Sound/SpamEmitSoundRequirePowerSystem.cs b/Content.Server/Sound/SpamEmitSoundRequirePowerSystem.cs
index 9cc85060c6e..d2c2a8a1ca7 100644
--- a/Content.Server/Sound/SpamEmitSoundRequirePowerSystem.cs
+++ b/Content.Server/Sound/SpamEmitSoundRequirePowerSystem.cs
@@ -1,5 +1,7 @@
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
+using Content.Shared.Power;
+using Content.Shared.Power.Components;
using Content.Shared.Sound;
using Content.Shared.Sound.Components;
diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMonitorSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMonitorSystem.cs
index f61c57a4a6b..5e50740ae69 100644
--- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMonitorSystem.cs
+++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMonitorSystem.cs
@@ -3,6 +3,7 @@ using Content.Server.DeviceNetwork;
using Content.Server.DeviceNetwork.Systems;
using Content.Server.Power.Components;
using Content.Shared.DeviceNetwork;
+using Content.Shared.Power;
using Content.Shared.UserInterface;
using Content.Shared.SurveillanceCamera;
using Robust.Server.GameObjects;
diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraRouterSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraRouterSystem.cs
index d0c2cd78d32..315273a0cc4 100644
--- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraRouterSystem.cs
+++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraRouterSystem.cs
@@ -4,6 +4,7 @@ using Content.Server.DeviceNetwork.Systems;
using Content.Server.Power.Components;
using Content.Shared.ActionBlocker;
using Content.Shared.DeviceNetwork;
+using Content.Shared.Power;
using Content.Shared.SurveillanceCamera;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs
index 8dd253269d0..9d1dd00590a 100644
--- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs
+++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs
@@ -5,6 +5,7 @@ using Content.Server.Emp;
using Content.Server.Power.Components;
using Content.Shared.ActionBlocker;
using Content.Shared.DeviceNetwork;
+using Content.Shared.Power;
using Content.Shared.SurveillanceCamera;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Temperature/Systems/EntityHeaterSystem.cs b/Content.Server/Temperature/Systems/EntityHeaterSystem.cs
index ffc796cbb22..c4b5b72a9cb 100644
--- a/Content.Server/Temperature/Systems/EntityHeaterSystem.cs
+++ b/Content.Server/Temperature/Systems/EntityHeaterSystem.cs
@@ -3,6 +3,7 @@ using Content.Server.Temperature.Components;
using Content.Shared.Examine;
using Content.Shared.Placeable;
using Content.Shared.Popups;
+using Content.Shared.Power;
using Content.Shared.Temperature;
using Content.Shared.Verbs;
using Robust.Server.Audio;
diff --git a/Content.Server/VendingMachines/VendingMachineSystem.cs b/Content.Server/VendingMachines/VendingMachineSystem.cs
index 2866b14a835..a265ce2d431 100644
--- a/Content.Server/VendingMachines/VendingMachineSystem.cs
+++ b/Content.Server/VendingMachines/VendingMachineSystem.cs
@@ -16,6 +16,7 @@ using Content.Shared.Emag.Components;
using Content.Shared.Emag.Systems;
using Content.Shared.Emp;
using Content.Shared.Popups;
+using Content.Shared.Power;
using Content.Shared.Throwing;
using Content.Shared.UserInterface;
using Content.Shared.VendingMachines;
diff --git a/Content.Server/Wires/WiresSystem.cs b/Content.Server/Wires/WiresSystem.cs
index 92dcbb504f8..92a0322ecb8 100644
--- a/Content.Server/Wires/WiresSystem.cs
+++ b/Content.Server/Wires/WiresSystem.cs
@@ -9,6 +9,7 @@ using Content.Shared.GameTicking;
using Content.Shared.Hands.Components;
using Content.Shared.Interaction;
using Content.Shared.Popups;
+using Content.Shared.Power;
using Content.Shared.Tools.Components;
using Content.Shared.Wires;
using Robust.Server.GameObjects;
diff --git a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs
index 8fc2f26fa63..3681e3d402a 100644
--- a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs
+++ b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs
@@ -11,6 +11,7 @@ using Content.Shared.DeviceLinking.Events;
using Content.Shared.Paper;
using Content.Shared.Placeable;
using Content.Shared.Popups;
+using Content.Shared.Power;
using Content.Shared.Research.Components;
using Content.Shared.Xenoarchaeology.Equipment;
using Content.Shared.Xenoarchaeology.XenoArtifacts;
diff --git a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactCrusherSystem.cs b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactCrusherSystem.cs
index f65ba46f7a5..f841ea910e7 100644
--- a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactCrusherSystem.cs
+++ b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactCrusherSystem.cs
@@ -7,6 +7,7 @@ using Content.Server.Storage.Components;
using Content.Server.Xenoarchaeology.XenoArtifacts;
using Content.Shared.Body.Components;
using Content.Shared.Damage;
+using Content.Shared.Power;
using Content.Shared.Verbs;
using Content.Shared.Whitelist;
using Content.Shared.Xenoarchaeology.Equipment;
diff --git a/Content.Shared/Cabinet/ItemCabinetComponent.cs b/Content.Shared/Cabinet/ItemCabinetComponent.cs
index b1d7e4a263f..f83f6a96ada 100644
--- a/Content.Shared/Cabinet/ItemCabinetComponent.cs
+++ b/Content.Shared/Cabinet/ItemCabinetComponent.cs
@@ -1,3 +1,4 @@
+using Content.Shared.Containers.ItemSlots;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
diff --git a/Content.Shared/Cargo/Components/CashComponent.cs b/Content.Shared/Cargo/Components/CashComponent.cs
index 10a47ff803a..89af094e04a 100644
--- a/Content.Shared/Cargo/Components/CashComponent.cs
+++ b/Content.Shared/Cargo/Components/CashComponent.cs
@@ -3,7 +3,7 @@ using Robust.Shared.GameStates;
namespace Content.Shared.Cargo.Components;
///
-/// Can be inserted into a to increase the station's bank account.
+/// Can be inserted into a to increase the station's bank account.
///
[RegisterComponent, NetworkedComponent]
public sealed partial class CashComponent : Component
diff --git a/Content.Shared/Chemistry/Components/Solution.cs b/Content.Shared/Chemistry/Components/Solution.cs
index 35ab28f34a1..fc25781005f 100644
--- a/Content.Shared/Chemistry/Components/Solution.cs
+++ b/Content.Shared/Chemistry/Components/Solution.cs
@@ -6,6 +6,7 @@ using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using System.Collections;
using System.Linq;
+using Content.Shared.Chemistry.Components.SolutionManager;
namespace Content.Shared.Chemistry.Components
{
diff --git a/Content.Shared/Clothing/Components/PilotedByClothingComponent.cs b/Content.Shared/Clothing/Components/PilotedByClothingComponent.cs
index cd4d0d62030..a5303ac1212 100644
--- a/Content.Shared/Clothing/Components/PilotedByClothingComponent.cs
+++ b/Content.Shared/Clothing/Components/PilotedByClothingComponent.cs
@@ -1,3 +1,4 @@
+using Content.Shared.Clothing.EntitySystems;
using Robust.Shared.GameStates;
namespace Content.Shared.Clothing.Components;
diff --git a/Content.Shared/Clothing/Components/ToggleClothingComponent.cs b/Content.Shared/Clothing/Components/ToggleClothingComponent.cs
index c77aa03475f..04bc3ed4e83 100644
--- a/Content.Shared/Clothing/Components/ToggleClothingComponent.cs
+++ b/Content.Shared/Clothing/Components/ToggleClothingComponent.cs
@@ -1,5 +1,7 @@
using Content.Shared.Actions;
using Content.Shared.Clothing.EntitySystems;
+using Content.Shared.Item.ItemToggle.Components;
+using Content.Shared.Toggleable;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
diff --git a/Content.Shared/Containers/ContainerFillComponent.cs b/Content.Shared/Containers/ContainerFillComponent.cs
index 8c63cbc66af..7ce5fa88502 100644
--- a/Content.Shared/Containers/ContainerFillComponent.cs
+++ b/Content.Shared/Containers/ContainerFillComponent.cs
@@ -1,4 +1,5 @@
using Content.Shared.Storage;
+using Content.Shared.Storage.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Markdown.Mapping;
diff --git a/Content.Shared/Light/Components/SlimPoweredLightComponent.cs b/Content.Shared/Light/Components/SlimPoweredLightComponent.cs
new file mode 100644
index 00000000000..bf6ae0e5251
--- /dev/null
+++ b/Content.Shared/Light/Components/SlimPoweredLightComponent.cs
@@ -0,0 +1,17 @@
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Light.Components;
+
+// All content light code is terrible and everything is baked-in. Power code got predicted before light code did.
+///
+/// Handles turning a pointlight on / off based on power. Nothing else
+///
+[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
+public sealed partial class SlimPoweredLightComponent : Component
+{
+ ///
+ /// Used to make this as being lit. If unpowered then the light will still be off.
+ ///
+ [DataField, AutoNetworkedField]
+ public bool Enabled = true;
+}
diff --git a/Content.Shared/Light/EntitySystems/SlimPoweredLightSystem.cs b/Content.Shared/Light/EntitySystems/SlimPoweredLightSystem.cs
new file mode 100644
index 00000000000..6d984ed19a3
--- /dev/null
+++ b/Content.Shared/Light/EntitySystems/SlimPoweredLightSystem.cs
@@ -0,0 +1,67 @@
+using Content.Shared.Light.Components;
+using Content.Shared.Power;
+using Content.Shared.Power.Components;
+using Content.Shared.Power.EntitySystems;
+
+namespace Content.Shared.Light.EntitySystems;
+
+public sealed class SlimPoweredLightSystem : EntitySystem
+{
+ [Dependency] private readonly SharedPowerReceiverSystem _receiver = default!;
+ [Dependency] private readonly SharedPointLightSystem _lights = default!;
+
+ private bool _setting;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+ SubscribeLocalEvent(OnLightAttempt);
+ SubscribeLocalEvent(OnLightPowerChanged);
+ }
+
+ private void OnLightAttempt(Entity ent, ref AttemptPointLightToggleEvent args)
+ {
+ // Early-out to avoid having to trycomp stuff if we're the caller setting it
+ if (_setting)
+ return;
+
+ if (args.Enabled && !_receiver.IsPowered(ent.Owner))
+ args.Cancelled = true;
+ }
+
+ private void OnLightPowerChanged(Entity ent, ref PowerChangedEvent args)
+ {
+ // Early out if we don't need to trycomp.
+ if (args.Powered)
+ {
+ if (!ent.Comp.Enabled)
+ return;
+ }
+ else
+ {
+ if (!ent.Comp.Enabled)
+ return;
+ }
+
+ if (!_lights.TryGetLight(ent.Owner, out var light))
+ return;
+
+ var enabled = ent.Comp.Enabled && args.Powered;
+ _setting = true;
+ _lights.SetEnabled(ent.Owner, enabled, light);
+ _setting = false;
+ }
+
+ public void SetEnabled(Entity entity, bool enabled)
+ {
+ if (!Resolve(entity.Owner, ref entity.Comp, false))
+ return;
+
+ if (entity.Comp.Enabled == enabled)
+ return;
+
+ entity.Comp.Enabled = enabled;
+ Dirty(entity);
+ _lights.SetEnabled(entity.Owner, enabled);
+ }
+}
diff --git a/Content.Shared/Light/EntitySystems/UnpoweredFlashlightSystem.cs b/Content.Shared/Light/EntitySystems/UnpoweredFlashlightSystem.cs
index 42e55bea55d..8754de50583 100644
--- a/Content.Shared/Light/EntitySystems/UnpoweredFlashlightSystem.cs
+++ b/Content.Shared/Light/EntitySystems/UnpoweredFlashlightSystem.cs
@@ -13,6 +13,8 @@ namespace Content.Shared.Light.EntitySystems;
public sealed class UnpoweredFlashlightSystem : EntitySystem
{
+ // TODO: Split some of this to ItemTogglePointLight
+
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
diff --git a/Content.Shared/Objectives/ObjectiveInfo.cs b/Content.Shared/Objectives/ObjectiveInfo.cs
index 689fe17e6c8..0b7e7a15f6e 100644
--- a/Content.Shared/Objectives/ObjectiveInfo.cs
+++ b/Content.Shared/Objectives/ObjectiveInfo.cs
@@ -1,3 +1,4 @@
+using Content.Shared.Objectives.Components;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
diff --git a/Content.Shared/Payload/Components/PayloadTriggerComponent.cs b/Content.Shared/Payload/Components/PayloadTriggerComponent.cs
index 6d3df41ac97..b064e91198c 100644
--- a/Content.Shared/Payload/Components/PayloadTriggerComponent.cs
+++ b/Content.Shared/Payload/Components/PayloadTriggerComponent.cs
@@ -1,3 +1,4 @@
+using Content.Shared.Explosion.Components;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
diff --git a/Content.Shared/Power/EntitySystems/SharedPowerReceiverSystem.cs b/Content.Shared/Power/EntitySystems/SharedPowerReceiverSystem.cs
index 37ac7518896..2bc2af78314 100644
--- a/Content.Shared/Power/EntitySystems/SharedPowerReceiverSystem.cs
+++ b/Content.Shared/Power/EntitySystems/SharedPowerReceiverSystem.cs
@@ -1,3 +1,4 @@
+using System.Diagnostics.CodeAnalysis;
using Content.Shared.Examine;
using Content.Shared.Power.Components;
@@ -5,6 +6,16 @@ namespace Content.Shared.Power.EntitySystems;
public abstract class SharedPowerReceiverSystem : EntitySystem
{
+ public abstract bool ResolveApc(EntityUid entity, [NotNullWhen(true)] ref SharedApcPowerReceiverComponent? component);
+
+ public bool IsPowered(Entity entity)
+ {
+ if (!ResolveApc(entity.Owner, ref entity.Comp))
+ return true;
+
+ return entity.Comp.Powered;
+ }
+
protected string GetExamineText(bool powered)
{
return Loc.GetString("power-receiver-component-on-examine-main",
diff --git a/Content.Shared/Power/PowerChangedEvent.cs b/Content.Shared/Power/PowerChangedEvent.cs
new file mode 100644
index 00000000000..578a34142a8
--- /dev/null
+++ b/Content.Shared/Power/PowerChangedEvent.cs
@@ -0,0 +1,8 @@
+namespace Content.Shared.Power;
+
+///
+/// Raised whenever an ApcPowerReceiver becomes powered / unpowered.
+/// Does nothing on the client.
+///
+[ByRefEvent]
+public readonly record struct PowerChangedEvent(bool Powered, float ReceivingPower);
\ No newline at end of file
diff --git a/Content.Shared/PowerCell/PowerCellDrawComponent.cs b/Content.Shared/PowerCell/PowerCellDrawComponent.cs
index 9c2f72661de..7af44420a71 100644
--- a/Content.Shared/PowerCell/PowerCellDrawComponent.cs
+++ b/Content.Shared/PowerCell/PowerCellDrawComponent.cs
@@ -1,3 +1,4 @@
+using Content.Shared.Item.ItemToggle.Components;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
diff --git a/Content.Shared/Tools/Systems/SharedToolSystem.cs b/Content.Shared/Tools/Systems/SharedToolSystem.cs
index 201eb19a88b..86b91dcda46 100644
--- a/Content.Shared/Tools/Systems/SharedToolSystem.cs
+++ b/Content.Shared/Tools/Systems/SharedToolSystem.cs
@@ -33,6 +33,9 @@ public abstract partial class SharedToolSystem : EntitySystem
[Dependency] private readonly TurfSystem _turfs = default!;
[Dependency] protected readonly SharedSolutionContainerSystem SolutionContainer = default!;
+ public const string CutQuality = "Cutting";
+ public const string PulseQuality = "Pulsing";
+
public override void Initialize()
{
InitializeMultipleTool();
diff --git a/Content.Shared/Weapons/Melee/MeleeSoundSystem.cs b/Content.Shared/Weapons/Melee/MeleeSoundSystem.cs
index 5bf74802026..3add18365af 100644
--- a/Content.Shared/Weapons/Melee/MeleeSoundSystem.cs
+++ b/Content.Shared/Weapons/Melee/MeleeSoundSystem.cs
@@ -1,4 +1,5 @@
using Content.Shared.Weapons.Melee.Components;
+using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;