2021-02-27 04:12:09 +01:00
|
|
|
using System;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2021-07-31 12:41:59 +02:00
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
using Robust.Shared.Players;
|
2020-09-03 16:02:40 -04:00
|
|
|
using Robust.Shared.Serialization;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2020-09-03 16:02:40 -04:00
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Light.Component
|
2020-09-03 16:02:40 -04:00
|
|
|
{
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum ExpendableLightVisuals
|
|
|
|
|
{
|
2021-07-31 12:41:59 +02:00
|
|
|
State,
|
|
|
|
|
Behavior
|
2020-09-03 16:02:40 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum ExpendableLightState
|
|
|
|
|
{
|
|
|
|
|
BrandNew,
|
|
|
|
|
Lit,
|
|
|
|
|
Fading,
|
|
|
|
|
Dead
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-31 12:41:59 +02:00
|
|
|
[NetworkedComponent]
|
2021-06-09 22:19:39 +02:00
|
|
|
public abstract class SharedExpendableLightComponent: Robust.Shared.GameObjects.Component
|
2020-09-03 16:02:40 -04:00
|
|
|
{
|
2021-09-07 18:47:23 +10:00
|
|
|
public static readonly AudioParams LoopedSoundParams = new(0, 1, "Master", 62.5f, 1, 1, true, 0.3f);
|
2021-07-31 12:41:59 +02:00
|
|
|
|
2020-09-03 16:02:40 -04:00
|
|
|
[ViewVariables(VVAccess.ReadOnly)]
|
2021-10-05 14:29:03 +11:00
|
|
|
public ExpendableLightState CurrentState { get; set; }
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("turnOnBehaviourID")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public string TurnOnBehaviourID { get; set; } = string.Empty;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("fadeOutBehaviourID")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public string FadeOutBehaviourID { get; set; } = string.Empty;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("glowDuration")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public float GlowDuration { get; set; } = 60 * 15f;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("fadeOutDuration")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public float FadeOutDuration { get; set; } = 60 * 5f;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("spentDesc")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public string SpentDesc { get; set; } = string.Empty;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("spentName")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public string SpentName { get; set; } = string.Empty;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("iconStateSpent")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public string IconStateSpent { get; set; } = string.Empty;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("iconStateOn")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public string IconStateLit { get; set; } = string.Empty;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-07-31 19:52:33 +02:00
|
|
|
[DataField("litSound", required: true)]
|
2022-02-10 13:01:43 +11:00
|
|
|
public SoundSpecifier LitSound { get; set; } = default!;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-08-13 21:31:37 -07:00
|
|
|
[DataField("loopedSound")]
|
|
|
|
|
public string? LoopedSound { get; set; } = null;
|
2020-09-03 16:02:40 -04:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("dieSound")]
|
2022-02-10 13:01:43 +11:00
|
|
|
public SoundSpecifier? DieSound { get; set; } = null;
|
2020-09-03 16:02:40 -04:00
|
|
|
}
|
|
|
|
|
}
|