Component ECS (#17991)

This commit is contained in:
metalgearsloth
2023-07-13 20:20:46 +10:00
committed by GitHub
parent 0c93be1dcd
commit fbf1d476f2
13 changed files with 108 additions and 114 deletions

View File

@@ -2,25 +2,24 @@ using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Chemistry.Components
namespace Content.Shared.Chemistry.Components;
[NetworkedComponent()]
public abstract class SharedHyposprayComponent : Component
{
[NetworkedComponent()]
public abstract class SharedHyposprayComponent : Component
{
[DataField("solutionName")]
public string SolutionName = "hypospray";
}
[DataField("solutionName")]
public string SolutionName = "hypospray";
}
[Serializable, NetSerializable]
public sealed class HyposprayComponentState : ComponentState
{
public FixedPoint2 CurVolume { get; }
public FixedPoint2 MaxVolume { get; }
[Serializable, NetSerializable]
public sealed class HyposprayComponentState : ComponentState
{
public FixedPoint2 CurVolume { get; }
public FixedPoint2 MaxVolume { get; }
public HyposprayComponentState(FixedPoint2 curVolume, FixedPoint2 maxVolume)
{
CurVolume = curVolume;
MaxVolume = maxVolume;
}
public HyposprayComponentState(FixedPoint2 curVolume, FixedPoint2 maxVolume)
{
CurVolume = curVolume;
MaxVolume = maxVolume;
}
}