* Initial resources commit * Initial code commit * Added additional resources * Continuing to build holopad and telephone systems * Added hologram shader * Added hologram system and entity * Holo calls now have a hologram of the user appear on them * Initial implementation of holopads transmitting nearby chatter * Added support for linking across multiple telephones/holopads/entities * Fixed a bunch of bugs * Tried simplifying holopad entity dependence, added support for mid-call user switching * Replaced PVS expansion with manually networked sprite states * Adjusted volume of ring tone * Added machine board * Minor features and tweaks * Resolving merge conflict * Recommit audio attributions * Telephone chat adjustments * Added support for AI interactions with holopads * Building the holopad UI * Holopad UI finished * Further UI tweaks * Station AI can hear local chatter when being projected from a holopad * Minor bug fixes * Added wire panels to holopads * Basic broadcasting * Start of emergency broadcasting code * Fixing issues with broadcasting * More work on emergency broadcasting * Updated holopad visuals * Added cooldown text to emergency broadcast and control lock out screen * Code clean up * Fixed issue with timing * Broadcasting now requires command access * Fixed some bugs * Added multiple holopad prototypes with different ranges * The AI no longer requires power to interact with holopads * Fixed some additional issues * Addressing more issues * Added emote support for holograms * Changed the broadcast lockout durations to their proper values * Added AI vision wire to holopads * Bug fixes * AI vision and interaction wires can be added to the same wire panel * Fixed error * More bug fixes * Fixed test fail * Embellished the emergency call lock out window * Holopads play borg sounds when speaking * Borg and AI names are listed as the caller ID on the holopad * Borg chassis can now be seen on holopad holograms * Holopad returns to a machine frame when badly damaged * Clarified some text * Fix merge conflict * Fixed merge conflict * Fixing merge conflict * Fixing merge conflict * Fixing merge conflict * Offset menu on open * AI can alt click on holopads to activate the projector * Bug fixes for intellicard interactions * Fixed speech issue with intellicards * The UI automatically opens for the AI when it alt-clicks on the holopad * Simplified shader math * Telephones will auto hang up 60 seconds after the last person on a call stops speaking * Added better support for AI requests when multiple AI cores are on the station * The call controls pop up for the AI when they accept a summons from a holopad * Compatibility mode fix for the hologram shader * Further shader fixes for compatibility mode * File clean up * More cleaning up * Removed access requirements from quantum holopads so they can used by nukies * The title of the holopad window now reflects the name of the device * Linked telephones will lose their connection if both move out of range of each other
134 lines
3.9 KiB
C#
134 lines
3.9 KiB
C#
using Content.Shared.Telephone;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Holopad;
|
|
|
|
/// <summary>
|
|
/// Holds data pertaining to holopads
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Holopads also require a <see cref="TelephoneComponent"/> to function
|
|
/// </remarks>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
[Access(typeof(SharedHolopadSystem))]
|
|
public sealed partial class HolopadComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The entity being projected by the holopad
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public Entity<HolopadHologramComponent>? Hologram;
|
|
|
|
/// <summary>
|
|
/// The entity using the holopad
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public Entity<HolopadUserComponent>? User;
|
|
|
|
/// <summary>
|
|
/// Proto ID for the user's hologram
|
|
/// </summary>
|
|
[DataField]
|
|
public EntProtoId? HologramProtoId;
|
|
|
|
/// <summary>
|
|
/// The entity that has locked out the controls of this device
|
|
/// </summary>
|
|
[ViewVariables, AutoNetworkedField]
|
|
public EntityUid? ControlLockoutOwner = null;
|
|
|
|
/// <summary>
|
|
/// The game tick the control lockout was initiated
|
|
/// </summary>
|
|
[ViewVariables, AutoNetworkedField]
|
|
public TimeSpan ControlLockoutStartTime;
|
|
|
|
/// <summary>
|
|
/// The duration that the control lockout will last in seconds
|
|
/// </summary>
|
|
[DataField]
|
|
public float ControlLockoutDuration { get; private set; } = 90f;
|
|
|
|
/// <summary>
|
|
/// The duration before the controls can be lockout again in seconds
|
|
/// </summary>
|
|
[DataField]
|
|
public float ControlLockoutCoolDown { get; private set; } = 180f;
|
|
}
|
|
|
|
#region: Event messages
|
|
|
|
/// <summary>
|
|
/// Data from by the server to the client for the holopad UI
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class HolopadBoundInterfaceState : BoundUserInterfaceState
|
|
{
|
|
public readonly Dictionary<NetEntity, string> Holopads;
|
|
|
|
public HolopadBoundInterfaceState(Dictionary<NetEntity, string> holopads)
|
|
{
|
|
Holopads = holopads;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Triggers the server to send updated power monitoring console data to the client for the single player session
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class HolopadStartNewCallMessage : BoundUserInterfaceMessage
|
|
{
|
|
public readonly NetEntity Receiver;
|
|
|
|
public HolopadStartNewCallMessage(NetEntity receiver)
|
|
{
|
|
Receiver = receiver;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Triggers the server to send updated power monitoring console data to the client for the single player session
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class HolopadAnswerCallMessage : BoundUserInterfaceMessage { }
|
|
|
|
/// <summary>
|
|
/// Triggers the server to send updated power monitoring console data to the client for the single player session
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class HolopadEndCallMessage : BoundUserInterfaceMessage { }
|
|
|
|
/// <summary>
|
|
/// Triggers the server to send updated power monitoring console data to the client for the single player session
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class HolopadStartBroadcastMessage : BoundUserInterfaceMessage { }
|
|
|
|
/// <summary>
|
|
/// Triggers the server to send updated power monitoring console data to the client for the single player session
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class HolopadActivateProjectorMessage : BoundUserInterfaceMessage { }
|
|
|
|
/// <summary>
|
|
/// Triggers the server to send updated power monitoring console data to the client for the single player session
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class HolopadStationAiRequestMessage : BoundUserInterfaceMessage { }
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// Key to the Holopad UI
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public enum HolopadUiKey : byte
|
|
{
|
|
InteractionWindow,
|
|
InteractionWindowForAi,
|
|
AiActionWindow,
|
|
AiRequestWindow
|
|
}
|