2021-07-30 19:22:06 +02:00
|
|
|
using Content.Shared.Sound;
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Storage.Components
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Allows locking/unlocking, with access determined by AccessReader
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class LockComponent : Component
|
2021-07-30 19:22:06 +02:00
|
|
|
{
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("locked")] public bool Locked { get; set; } = true;
|
2021-08-22 19:32:24 +03:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("lockOnClick")] public bool LockOnClick { get; set; } = false;
|
2021-07-31 19:52:33 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("unlockingSound")] public SoundSpecifier UnlockSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/door_lock_off.ogg");
|
2022-03-23 05:34:09 +03:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("lockingSound")] public SoundSpecifier LockSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/door_lock_on.ogg");
|
2021-07-30 19:22:06 +02:00
|
|
|
}
|
|
|
|
|
}
|