Files
tbd-station-14/Content.Server/Body/Mechanisms/Behaviors/LungBehavior.cs
Pieter-Jan Briers ed1a96e536 Nullability fixes.
2020-08-20 16:48:15 +02:00

28 lines
707 B
C#

#nullable enable
using System;
using Content.Server.Body.Network;
using Content.Server.GameObjects.Components.Body.Respiratory;
using JetBrains.Annotations;
namespace Content.Server.Body.Mechanisms.Behaviors
{
[UsedImplicitly]
public class LungBehavior : MechanismBehavior
{
protected override Type? Network => typeof(RespiratoryNetwork);
public override void PreMetabolism(float frameTime)
{
base.PreMetabolism(frameTime);
if (Mechanism.Body == null ||
!Mechanism.Body.Owner.TryGetComponent(out LungComponent? lung))
{
return;
}
lung.Update(frameTime);
}
}
}