Files
tbd-station-14/Content.Server/GameObjects/EntitySystems/BatteryDischargerSystem.cs
metalgearsloth 619386a04a Server EntitySystem cleanup (#1617)
* Server EntitySystem cleanup

I went after low-hanging fruit systems.

* Add / change to internal access modifiers to systems
* Use EntityQuery to get components instead
* Add sealed modifier to systems
* Remove unused imports
* Add jetbrains annotation for unused classes
* Removed some pragmas for dependencies

This should also fix a decent chunk of the server build warnings, at least the ones that matter.

* Also disposals

* Update Content.Server/GameObjects/EntitySystems/GravitySystem.cs

* Fix build

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-08-13 14:17:12 +02:00

28 lines
819 B
C#

using Content.Server.GameObjects.Components.Power.PowerNetComponents;
using JetBrains.Annotations;
using Robust.Server.Interfaces.Timing;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.IoC;
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class BatteryDischargerSystem : EntitySystem
{
[Dependency] private readonly IPauseManager _pauseManager = default!;
public override void Update(float frameTime)
{
foreach (var comp in ComponentManager.EntityQuery<BatteryDischargerComponent>())
{
if (_pauseManager.IsEntityPaused(comp.Owner))
{
continue;
}
comp.Update(frameTime);
}
}
}
}