* mechs * interaction relay * atmos handling * fuck around with interaction events SPAGHETTI CODE OH MY GOD * more sprites and whatever the hell * more mech shit * more shit for equipment * starting equipment (for nukie mechs and such) * equipment cycling * starting with some of the ui * a fat chunk of ui prototyping * done tinkering with ui * a bunch of ui stuff and what have yous * cleaning up grabber and state handling * make the ui actually functional + watch me port a million icons I swear i'll prune the sprites later blease * start on construction * construction yo mamma * remove some unused files * fix a silly * make the graph sane * make it actually constructible. * print the boards as well, bozo * rebalance part prices * eject action also i appease the russians by remembering to localize * Punch Shit * make mech integrity and repairs work * Make the UI more based STOMP STOMP STOMP STOMP * make equipment even more based * batteries and other such delights * make the ui look pimpin af * make the construction mega based * UI but so epic * equipment * some sweat tweaks * damage rebalancing * restructure tech * fix some shit * mechs inherit access * make icons actually use sprite specifiers * TRAILING COMMAA!!!!! * fix a mild indentation sin * undo this change because it isn't needed * actually fix this * secret webeditting shhhh * place this tech here * comments * foo
103 lines
3.5 KiB
C#
103 lines
3.5 KiB
C#
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
|
||
{
|
||
public Dictionary<EntityUid, BoundUserInterfaceState> States = new();
|
||
}
|
||
|
||
/// <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
|
||
{
|
||
public EntityUid Equipment;
|
||
|
||
public MechEquipmentRemoveMessage(EntityUid equipment)
|
||
{
|
||
Equipment = equipment;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// base for all mech ui messages
|
||
/// </summary>
|
||
[Serializable, NetSerializable]
|
||
public abstract class MechEquipmentUiMessage : BoundUserInterfaceMessage
|
||
{
|
||
public EntityUid Equipment;
|
||
}
|
||
|
||
/// <summary>
|
||
/// event raised for the grabber equipment to eject an item from it's storage
|
||
/// </summary>
|
||
[Serializable, NetSerializable]
|
||
public sealed class MechGrabberEjectMessage : MechEquipmentUiMessage
|
||
{
|
||
public EntityUid Item;
|
||
|
||
public MechGrabberEjectMessage(EntityUid equipment, EntityUid uid)
|
||
{
|
||
Equipment = equipment;
|
||
Item = uid;
|
||
}
|
||
}
|
||
|
||
/// <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
|
||
{
|
||
public Dictionary<EntityUid, BoundUserInterfaceState> EquipmentStates = new();
|
||
}
|
||
|
||
[Serializable, NetSerializable]
|
||
public sealed class MechGrabberUiState : BoundUserInterfaceState
|
||
{
|
||
public List<EntityUid> Contents = new();
|
||
public int MaxContents;
|
||
}
|