Files
tbd-station-14/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs
2021-06-09 22:19:39 +02:00

31 lines
814 B
C#

using Content.Server.Disposal.Unit.Components;
using Robust.Shared.GameObjects;
namespace Content.Server.Disposal.Unit.EntitySystems
{
public sealed class DisposalUnitSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DisposalUnitComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
}
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<DisposalUnitComponent, PhysicsBodyTypeChangedEvent>();
}
private static void BodyTypeChanged(
EntityUid uid,
DisposalUnitComponent component,
PhysicsBodyTypeChangedEvent args)
{
component.UpdateVisualState();
}
}
}