Files
OldThink/Content.Shared/Light/Component/SharedHandheldLightComponent.cs

50 lines
1.3 KiB
C#
Raw Normal View History

using Content.Shared.Actions.ActionTypes;
using Robust.Shared.GameStates;
2020-01-09 00:27:52 +01:00
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
2020-01-09 00:27:52 +01:00
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
{
[DataField("toggleActionId", customTypeSerializer:typeof(PrototypeIdSerializer<InstantActionPrototype>))]
public string ToggleActionId = "ToggleLight";
[DataField("toggleAction")]
public InstantAction? ToggleAction;
2021-12-27 18:15:16 +11:00
public const int StatusLevels = 6;
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
{
public byte? Charge { get; }
public bool Activated { get; }
public HandheldLightComponentState(bool activated, byte? charge)
2020-01-09 00:27:52 +01:00
{
Activated = activated;
2020-01-09 00:27:52 +01:00
Charge = charge;
}
}
}
[Serializable, NetSerializable]
public enum HandheldLightVisuals
{
Power
}
[Serializable, NetSerializable]
public enum HandheldLightPowerStates
{
FullPower,
LowPower,
Dying,
}
2020-01-09 00:27:52 +01:00
}