Re-organize all projects (#4166)
This commit is contained in:
19
Content.Server/Power/EntitySystems/BaseChargerSystem.cs
Normal file
19
Content.Server/Power/EntitySystems/BaseChargerSystem.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
#nullable enable
|
||||
using Content.Server.Power.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Power.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class BaseChargerSystem : EntitySystem
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<BaseCharger>(true))
|
||||
{
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Content.Server/Power/EntitySystems/PowerNetSystem.cs
Normal file
20
Content.Server/Power/EntitySystems/PowerNetSystem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
#nullable enable
|
||||
using Content.Server.Power.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server.Power.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class PowerNetSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IPowerNetManager _powerNetManager = default!;
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
_powerNetManager.Update(frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
30
Content.Server/Power/EntitySystems/PowerReceiverSystem.cs
Normal file
30
Content.Server/Power/EntitySystems/PowerReceiverSystem.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Content.Server.Power.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Power.EntitySystems
|
||||
{
|
||||
public sealed class PowerReceiverSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<PowerReceiverComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<PowerReceiverComponent, PhysicsBodyTypeChangedEvent>();
|
||||
}
|
||||
|
||||
private static void BodyTypeChanged(
|
||||
EntityUid uid,
|
||||
PowerReceiverComponent component,
|
||||
PhysicsBodyTypeChangedEvent args)
|
||||
{
|
||||
component.AnchorUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user