2021-02-16 02:51:52 +01:00
|
|
|
using System;
|
2020-08-25 08:54:23 -04:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2020-08-25 08:54:23 -04:00
|
|
|
using Robust.Shared.Maths;
|
2020-09-13 14:23:52 +02:00
|
|
|
using Robust.Shared.Serialization;
|
2020-08-25 08:54:23 -04:00
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Cuffs.Components
|
2020-08-25 08:54:23 -04:00
|
|
|
{
|
2021-07-12 01:32:10 -07:00
|
|
|
[NetworkedComponent()]
|
2022-02-16 00:23:23 -07:00
|
|
|
public abstract class SharedCuffableComponent : Component
|
2020-08-25 08:54:23 -04:00
|
|
|
{
|
|
|
|
|
[ViewVariables]
|
2021-02-16 02:51:52 +01:00
|
|
|
public bool CanStillInteract { get; set; } = true;
|
2020-08-25 08:54:23 -04:00
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
protected sealed class CuffableComponentState : ComponentState
|
|
|
|
|
{
|
|
|
|
|
public bool CanStillInteract { get; }
|
|
|
|
|
public int NumHandsCuffed { get; }
|
2021-02-16 02:51:52 +01:00
|
|
|
public string? RSI { get; }
|
2020-08-25 08:54:23 -04:00
|
|
|
public string IconState { get; }
|
|
|
|
|
public Color Color { get; }
|
|
|
|
|
|
2021-07-12 01:32:10 -07:00
|
|
|
public CuffableComponentState(int numHandsCuffed, bool canStillInteract, string? rsiPath, string iconState, Color color)
|
2020-08-25 08:54:23 -04:00
|
|
|
{
|
|
|
|
|
NumHandsCuffed = numHandsCuffed;
|
|
|
|
|
CanStillInteract = canStillInteract;
|
|
|
|
|
RSI = rsiPath;
|
|
|
|
|
IconState = iconState;
|
|
|
|
|
Color = color;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|