Files
crystall-punk-14/Content.Shared/Chemistry/Components/SharedInjectorComponent.cs

40 lines
1.2 KiB
C#
Raw Normal View History

using System;
using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
2021-06-09 22:19:39 +02:00
namespace Content.Shared.Chemistry.Components
{
/// <summary>
/// Shared class for injectors & syringes
/// </summary>
2022-02-07 00:34:13 +11:00
[NetworkedComponent, ComponentProtoName("Injector")]
public abstract class SharedInjectorComponent : Component
{
/// <summary>
/// Component data used for net updates. Used by client for item status ui
/// </summary>
[Serializable, NetSerializable]
2022-02-07 00:34:13 +11:00
public sealed class InjectorComponentState : ComponentState
{
public FixedPoint2 CurrentVolume { get; }
public FixedPoint2 TotalVolume { get; }
public InjectorToggleMode CurrentMode { get; }
2022-02-07 00:34:13 +11:00
public InjectorComponentState(FixedPoint2 currentVolume, FixedPoint2 totalVolume, SharedInjectorComponent.InjectorToggleMode currentMode)
{
CurrentVolume = currentVolume;
TotalVolume = totalVolume;
CurrentMode = currentMode;
}
}
2022-02-07 00:34:13 +11:00
public enum InjectorToggleMode : byte
{
Inject,
Draw
}
}
}