2022-12-10 12:05:39 -05:00
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Mech;
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public enum MechUiKey : byte
|
|
|
|
|
|
{
|
|
|
|
|
|
Key
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Event raised to collect BUI states for each of the mech's equipment items
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public sealed class MechEquipmentUiStateReadyEvent : EntityEventArgs
|
|
|
|
|
|
{
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public Dictionary<NetEntity, BoundUserInterfaceState> States = new();
|
2022-12-10 12:05:39 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Event raised to relay an equipment ui message
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public sealed class MechEquipmentUiMessageRelayEvent : EntityEventArgs
|
|
|
|
|
|
{
|
|
|
|
|
|
public MechEquipmentUiMessage Message;
|
|
|
|
|
|
|
|
|
|
|
|
public MechEquipmentUiMessageRelayEvent(MechEquipmentUiMessage message)
|
|
|
|
|
|
{
|
|
|
|
|
|
Message = message;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// UI event raised to remove a piece of equipment from a mech
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class MechEquipmentRemoveMessage : BoundUserInterfaceMessage
|
|
|
|
|
|
{
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public NetEntity Equipment;
|
2022-12-10 12:05:39 -05:00
|
|
|
|
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public MechEquipmentRemoveMessage(NetEntity equipment)
|
2022-12-10 12:05:39 -05:00
|
|
|
|
{
|
|
|
|
|
|
Equipment = equipment;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// base for all mech ui messages
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public abstract class MechEquipmentUiMessage : BoundUserInterfaceMessage
|
|
|
|
|
|
{
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public NetEntity Equipment;
|
2022-12-10 12:05:39 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// event raised for the grabber equipment to eject an item from it's storage
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class MechGrabberEjectMessage : MechEquipmentUiMessage
|
|
|
|
|
|
{
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public NetEntity Item;
|
2022-12-10 12:05:39 -05:00
|
|
|
|
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public MechGrabberEjectMessage(NetEntity equipment, NetEntity uid)
|
2022-12-10 12:05:39 -05:00
|
|
|
|
{
|
|
|
|
|
|
Equipment = equipment;
|
|
|
|
|
|
Item = uid;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-05-05 13:21:13 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Event raised for the soundboard equipment to play a sound from its component
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class MechSoundboardPlayMessage : MechEquipmentUiMessage
|
|
|
|
|
|
{
|
|
|
|
|
|
public int Sound;
|
|
|
|
|
|
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public MechSoundboardPlayMessage(NetEntity equipment, int sound)
|
2023-05-05 13:21:13 +00:00
|
|
|
|
{
|
|
|
|
|
|
Equipment = equipment;
|
|
|
|
|
|
Sound = sound;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-10 12:05:39 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// BUI state for mechs that also contains all equipment ui states.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⢐⠤⢃⢰⠐⡄⣀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⣨⠀⢁⠁⠐⡐⠠⠜⠐⠀
|
|
|
|
|
|
/// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠔⠐⢀⡁⣀⠔⡌⠡⢀⢐⠁⠀
|
|
|
|
|
|
/// ⠀⠀⠀⠀⢀⠔⠀⡂⡄⠠⢀⡀⠀⣄⡀⠠⠤⠴⡋⠑⡠⠀⠔⠐⢂⠕⢀⡂⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠀⡔⠁⠠⡐⠁⠀⠀⠀⢘⠀⠀⠀⠀⠠⠀⠈⠪⠀⠑⠡⣃⠈⠤⡈⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠨⠀⠄⡒⠀⡂⢈⠀⣀⢌⠀⠀⠁⡈⠀⢆⢀⠀⡀⠉⠒⢆⠑⠀⠀⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠀⡁⠐⠠⠐⡀⠀⢀⣀⠣⡀⠢⡀⠀⢀⡃⠰⠀⠈⠠⢁⠎⠀⠀⠀⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠀⠅⠒⣈⢣⠠⠈⠕⠁⠱⠄⢤⠈⠪⠡⠎⢘⠈⡁⢙⠈⠀⠀⠀⠀⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠀⠃⠀⢡⠀⠧⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢕⡈⠌⠀⠀⠀⠀⠀⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠀⠀⠀⠀⠈⡀⡀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⡰⠀⡐⠀⠀⠀⠀⠀⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠀⠀⠀⠀⠀⢈⢂⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠀⡃⠀⠀⠀⠀⠀⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠀⠀⠀⠀⠀⠎⠐⢅⠀⠀⠀⠀⠀⠀⠀⠀⠀⢐⠅⠚⠄⠀⠀⠀⠀⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⢈⠩⠈⠀⠐⠁⠀⢀⠀⠄⡂⠒⠐⠀⠆⠁⠰⠠⠀⢅⠈⠐⠄⢁⢡⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⢈⡀⠰⡁⠀⠁⠴⠁⠔⠀⠀⠄⠄⡁⠀⠂⠀⠢⠠⠁⠀⠠⠈⠂⠬⠀⠀⠀
|
|
|
|
|
|
/// ⠀⠀⠠⡂⢄⠤⠒⣁⠐⢕⢀⡈⡐⡠⠄⢐⠀⠈⠠⠈⡀⠂⢀⣀⠰⠁⠠⠀⠀
|
|
|
|
|
|
/// trojan horse bui state⠀
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class MechBoundUiState : BoundUserInterfaceState
|
|
|
|
|
|
{
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public Dictionary<NetEntity, BoundUserInterfaceState> EquipmentStates = new();
|
2022-12-10 12:05:39 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class MechGrabberUiState : BoundUserInterfaceState
|
|
|
|
|
|
{
|
2023-09-11 09:42:41 +10:00
|
|
|
|
public List<NetEntity> Contents = new();
|
2022-12-10 12:05:39 -05:00
|
|
|
|
public int MaxContents;
|
|
|
|
|
|
}
|
2023-05-05 13:21:13 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// List of sound collection ids to be localized and displayed.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class MechSoundboardUiState : BoundUserInterfaceState
|
|
|
|
|
|
{
|
|
|
|
|
|
public List<string> Sounds = new();
|
|
|
|
|
|
}
|