using Content.Shared.Telephone;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Holopad;
///
/// Holds data pertaining to holopads
///
///
/// Holopads also require a to function
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedHolopadSystem))]
public sealed partial class HolopadComponent : Component
{
///
/// The entity being projected by the holopad
///
[ViewVariables]
public Entity? Hologram;
///
/// The entity using the holopad
///
[ViewVariables]
public Entity? User;
///
/// Proto ID for the user's hologram
///
[DataField]
public EntProtoId? HologramProtoId;
///
/// The entity that has locked out the controls of this device
///
[ViewVariables, AutoNetworkedField]
public EntityUid? ControlLockoutOwner = null;
///
/// The game tick the control lockout was initiated
///
[ViewVariables, AutoNetworkedField]
public TimeSpan ControlLockoutStartTime;
///
/// The duration that the control lockout will last in seconds
///
[DataField]
public float ControlLockoutDuration { get; private set; } = 90f;
///
/// The duration before the controls can be lockout again in seconds
///
[DataField]
public float ControlLockoutCoolDown { get; private set; } = 180f;
}
#region: Event messages
///
/// Data from by the server to the client for the holopad UI
///
[Serializable, NetSerializable]
public sealed class HolopadBoundInterfaceState : BoundUserInterfaceState
{
public readonly Dictionary Holopads;
public HolopadBoundInterfaceState(Dictionary holopads)
{
Holopads = holopads;
}
}
///
/// Triggers the server to send updated power monitoring console data to the client for the single player session
///
[Serializable, NetSerializable]
public sealed class HolopadStartNewCallMessage : BoundUserInterfaceMessage
{
public readonly NetEntity Receiver;
public HolopadStartNewCallMessage(NetEntity receiver)
{
Receiver = receiver;
}
}
///
/// Triggers the server to send updated power monitoring console data to the client for the single player session
///
[Serializable, NetSerializable]
public sealed class HolopadAnswerCallMessage : BoundUserInterfaceMessage { }
///
/// Triggers the server to send updated power monitoring console data to the client for the single player session
///
[Serializable, NetSerializable]
public sealed class HolopadEndCallMessage : BoundUserInterfaceMessage { }
///
/// Triggers the server to send updated power monitoring console data to the client for the single player session
///
[Serializable, NetSerializable]
public sealed class HolopadStartBroadcastMessage : BoundUserInterfaceMessage { }
///
/// Triggers the server to send updated power monitoring console data to the client for the single player session
///
[Serializable, NetSerializable]
public sealed class HolopadActivateProjectorMessage : BoundUserInterfaceMessage { }
///
/// Triggers the server to send updated power monitoring console data to the client for the single player session
///
[Serializable, NetSerializable]
public sealed class HolopadStationAiRequestMessage : BoundUserInterfaceMessage { }
#endregion
///
/// Key to the Holopad UI
///
[Serializable, NetSerializable]
public enum HolopadUiKey : byte
{
InteractionWindow,
InteractionWindowForAi,
AiActionWindow,
AiRequestWindow
}