Refactor Barotrauma to be ECS. (#4674)

- Refactor IPressureProtection to be two different ECS events.
This commit is contained in:
Vera Aguilera Puerto
2021-09-22 13:02:25 +02:00
committed by GitHub
parent 6891c32eb5
commit 246fda53c5
8 changed files with 217 additions and 144 deletions

View File

@@ -1,21 +1,24 @@
using Content.Server.Pressure;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public class PressureProtectionComponent : Component, IPressureProtection
public class PressureProtectionComponent : Component
{
public override string Name => "PressureProtection";
[ViewVariables]
[DataField("highPressureMultiplier")]
public float HighPressureMultiplier { get; private set; } = 1f;
public float HighPressureMultiplier { get; } = 1f;
[DataField("highPressureModifier")]
public float HighPressureModifier { get; } = 0f;
[ViewVariables]
[DataField("lowPressureMultiplier")]
public float LowPressureMultiplier { get; private set; } = 1f;
public float LowPressureMultiplier { get; } = 1f;
[DataField("lowPressureModifier")]
public float LowPressureModifier { get; } = 0f;
}
}