Files
tbd-station-14/Content.Shared/Chemistry/Components/SharedInjectorComponent.cs
keronshb ec739c24da DoAfter Refactor Fixes (#14278)
* Doafterfixes

* Injector blocker
2023-02-25 23:33:06 -06:00

44 lines
1.3 KiB
C#

using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Chemistry.Components
{
/// <summary>
/// Shared class for injectors & syringes
/// </summary>
[NetworkedComponent, ComponentProtoName("Injector")]
public abstract class SharedInjectorComponent : Component
{
/// <summary>
/// Checks to see if the entity being injected
/// </summary>
[DataField("isInjecting")]
public bool IsInjecting;
/// <summary>
/// Component data used for net updates. Used by client for item status ui
/// </summary>
[Serializable, NetSerializable]
public sealed class InjectorComponentState : ComponentState
{
public FixedPoint2 CurrentVolume { get; }
public FixedPoint2 TotalVolume { get; }
public InjectorToggleMode CurrentMode { get; }
public InjectorComponentState(FixedPoint2 currentVolume, FixedPoint2 totalVolume, InjectorToggleMode currentMode)
{
CurrentVolume = currentVolume;
TotalVolume = totalVolume;
CurrentMode = currentMode;
}
}
public enum InjectorToggleMode : byte
{
Inject,
Draw
}
}
}