2025-05-02 18:22:29 +10:00
|
|
|
using Robust.Shared.Audio;
|
2024-05-26 16:07:16 -04:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Lock;
|
2023-11-22 12:16:02 -05:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is used for activatable UIs that require the entity to have a lock in a certain state.
|
|
|
|
|
/// </summary>
|
2024-05-26 16:07:16 -04:00
|
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(LockSystem))]
|
2025-08-10 11:10:13 -07:00
|
|
|
public sealed partial class UIRequiresLockComponent : Component
|
2023-11-22 12:16:02 -05:00
|
|
|
{
|
2025-08-10 11:10:13 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// UIs that are locked behind this component.
|
|
|
|
|
/// If null, will close all UIs.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public List<Enum>? UserInterfaceKeys;
|
|
|
|
|
|
2023-11-22 12:16:02 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// TRUE: the lock must be locked to access the UI.
|
|
|
|
|
/// FALSE: the lock must be unlocked to access the UI.
|
|
|
|
|
/// </summary>
|
2024-05-26 16:07:16 -04:00
|
|
|
[DataField]
|
|
|
|
|
public bool RequireLocked;
|
2025-05-02 18:22:29 +10:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound to be played if an attempt is blocked.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier? AccessDeniedSound = new SoundPathSpecifier("/Audio/Machines/custom_deny.ogg");
|
2025-08-10 11:10:13 -07:00
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public LocId? Popup = "entity-storage-component-locked-message";
|
2023-11-22 12:16:02 -05:00
|
|
|
}
|