* brigtimer * ok * TextScreen w timer implementation * second commit * working brig timer * signal timers near completion * soon done * removed licenses, fixes noRotation on screens, minor edits * no message * no message * removed my last todos * removed csproj.rej?? * missed a thing with .yml and tests * fix tests * Update base_structureairlocks.yml * timespan type serialize * activation turned into comp * sloth review * Update timer.yml * small changes --------- Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com> Co-authored-by: rolfero <45628623+rolfero@users.noreply.github.com>
69 lines
1.7 KiB
C#
69 lines
1.7 KiB
C#
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.MachineLinking;
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum SignalTimerUiKey : byte
|
|
{
|
|
Key
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents a SignalTimerComponent state that can be sent to the client
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class SignalTimerBoundUserInterfaceState : BoundUserInterfaceState
|
|
{
|
|
public string CurrentText;
|
|
public string CurrentDelayMinutes;
|
|
public string CurrentDelaySeconds;
|
|
public bool ShowText;
|
|
public TimeSpan TriggerTime;
|
|
public bool TimerStarted;
|
|
public bool HasAccess;
|
|
|
|
public SignalTimerBoundUserInterfaceState(string currentText,
|
|
string currentDelayMinutes,
|
|
string currentDelaySeconds,
|
|
bool showText,
|
|
TimeSpan triggerTime,
|
|
bool timerStarted,
|
|
bool hasAccess)
|
|
{
|
|
CurrentText = currentText;
|
|
CurrentDelayMinutes = currentDelayMinutes;
|
|
CurrentDelaySeconds = currentDelaySeconds;
|
|
ShowText = showText;
|
|
TriggerTime = triggerTime;
|
|
TimerStarted = timerStarted;
|
|
HasAccess = hasAccess;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class SignalTimerTextChangedMessage : BoundUserInterfaceMessage
|
|
{
|
|
public string Text { get; }
|
|
|
|
public SignalTimerTextChangedMessage(string text)
|
|
{
|
|
Text = text;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class SignalTimerDelayChangedMessage : BoundUserInterfaceMessage
|
|
{
|
|
public TimeSpan Delay { get; }
|
|
public SignalTimerDelayChangedMessage(TimeSpan delay)
|
|
{
|
|
Delay = delay;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class SignalTimerStartMessage : BoundUserInterfaceMessage
|
|
{
|
|
|
|
}
|