2022-02-26 18:24:08 +13:00
|
|
|
using Content.Shared.Actions.ActionTypes;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2020-01-09 00:27:52 +01:00
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Light.Component
|
2020-01-09 00:27:52 +01:00
|
|
|
{
|
2021-12-27 18:15:16 +11:00
|
|
|
[NetworkedComponent]
|
2021-06-09 22:19:39 +02:00
|
|
|
public abstract class SharedHandheldLightComponent : Robust.Shared.GameObjects.Component
|
2020-01-09 00:27:52 +01:00
|
|
|
{
|
2022-02-26 18:24:08 +13:00
|
|
|
[DataField("toggleAction", required: true)]
|
2022-02-27 16:02:39 +13:00
|
|
|
public InstantAction ToggleAction = new();
|
2022-02-26 18:24:08 +13:00
|
|
|
|
2021-12-27 18:15:16 +11:00
|
|
|
public const int StatusLevels = 6;
|
2020-11-01 07:56:46 +11:00
|
|
|
|
2020-01-09 00:27:52 +01:00
|
|
|
[Serializable, NetSerializable]
|
2021-12-27 18:15:16 +11:00
|
|
|
public sealed class HandheldLightComponentState : ComponentState
|
2020-01-09 00:27:52 +01:00
|
|
|
{
|
2020-11-01 07:56:46 +11:00
|
|
|
public byte? Charge { get; }
|
|
|
|
|
|
2021-07-12 01:32:10 -07:00
|
|
|
public HandheldLightComponentState(byte? charge)
|
2020-01-09 00:27:52 +01:00
|
|
|
{
|
|
|
|
|
Charge = charge;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-08-24 06:32:18 -04:00
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum HandheldLightVisuals
|
|
|
|
|
{
|
|
|
|
|
Power
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum HandheldLightPowerStates
|
|
|
|
|
{
|
|
|
|
|
FullPower,
|
|
|
|
|
LowPower,
|
|
|
|
|
Dying,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2020-01-09 00:27:52 +01:00
|
|
|
}
|