mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Added Emp interaction with Bar Sign There was already content for emp bar sign but no support for it. This adds the interaction with emps to make bar signs EmpDisabled. * Emp BarSigns stylistic change * Fixed redundant bar signs Fixes the extra bar sign popups bug introduced in #42364 * Block bar sign UI when emped * Revert "Fixed redundant bar signs" This reverts commit 23168bb503bcf267ac553eff9ac9674bf28adb4b.
56 lines
1.4 KiB
C#
56 lines
1.4 KiB
C#
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.BarSign;
|
|
|
|
/// <summary>
|
|
/// Makes it possible to switch this entity's sprite and name using a BUI.
|
|
/// <seealso cref="BarSignPrototype"/>
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
|
|
public sealed partial class BarSignComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The current bar sign prototype being displayed.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public ProtoId<BarSignPrototype>? Current;
|
|
|
|
/// <summary>
|
|
/// The bar sign fallback state upon being EMPed.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public ProtoId<BarSignPrototype>? Emped = "EmpBarSign";
|
|
}
|
|
|
|
/// <summary>
|
|
/// The key for the BoundUserInterface.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public enum BarSignUiKey : byte
|
|
{
|
|
Key
|
|
}
|
|
|
|
/// <summary>
|
|
/// The enum to be used for appearance data of the bar sign.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public enum BarSignVisuals : byte
|
|
{
|
|
BarSignPrototype,
|
|
}
|
|
|
|
/// <summary>
|
|
/// Send from the client when setting the bar sign.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class SetBarSignMessage(ProtoId<BarSignPrototype> sign) : BoundUserInterfaceMessage
|
|
{
|
|
/// <summary>
|
|
/// The new prototype to use.
|
|
/// </summary>
|
|
public ProtoId<BarSignPrototype> Sign = sign;
|
|
}
|