Files
tbd-station-14/Content.Server/GameObjects/EntitySystems/GasCanisterSystem.cs
Pieter-Jan Briers 251df93b71 Remove usages of AnchoredChangedMessage.
It was a component message which is now deprecated.
2021-05-13 02:05:46 +02:00

41 lines
1.1 KiB
C#

using Content.Server.GameObjects.Components.Atmos;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class GasCanisterSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<GasCanisterComponent, PhysicsBodyTypeChangedEvent>(OnBodyTypeChanged);
}
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<GasCanisterComponent, PhysicsBodyTypeChangedEvent>();
}
private static void OnBodyTypeChanged(
EntityUid uid,
GasCanisterComponent component,
PhysicsBodyTypeChangedEvent args)
{
component.AnchorUpdate();
}
public override void Update(float frameTime)
{
foreach (var component in ComponentManager.EntityQuery<GasCanisterComponent>(true))
{
component.Update(frameTime);
}
}
}
}