CatStation/Content.Shared/Doors/Components/TurnstileComponent.cs
AftrLite 4645e40b60
The Respritening - Batch 1 (#44857)
* initial commit
LICENSES / COPYRIGHT ARE NOT FINALIZED.

* test push per ArtisticRoomba

* more progress

* nearly done

* push

* more progress

* second big wave
LICENSING REMAINS INCOMPLETE

* more progress + attributions

* astrotile consistency

* walls attribution pass!

* marble walls, concrete tweaks, attribution fixes

* linter fixes, provisional borders for marble walls

* test fixes

* why is PlatingDamaged load-bearing???

* fixed attribution that flew under the radar, updates to Damaged Plating & Damaged Steel tiles.

* requested changes

* airlock visualizer tweak

---------

Co-authored-by: Princess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Co-authored-by: Whatstone <whatston3@gmail.com>
2026-08-12 17:46:16 +00:00

73 lines
2.2 KiB
C#

using Content.Shared.Doors.Systems;
using Content.Shared.Whitelist;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Doors.Components;
/// <summary>
/// This is used for a condition door that allows entry only through a single side.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
[Access(typeof(SharedTurnstileSystem))]
public sealed partial class TurnstileComponent : Component
{
/// <summary>
/// A whitelist of the things this turnstile can choose to block or let through.
/// Things not in this whitelist will be ignored by default.
/// </summary>
[DataField]
public EntityWhitelist? ProcessWhitelist;
/// <summary>
/// The next time at which the resist message can show.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField]
public TimeSpan NextResistTime;
/// <summary>
/// How much time has to pass before the Turnstile can initiate a new animation.
/// </summary>
[DataField]
public TimeSpan AnimationCooldown = TimeSpan.FromSeconds(0.75);
/// <summary>
/// Maintained hashset of entities currently passing through the turnstile.
/// </summary>
[DataField, AutoNetworkedField]
public HashSet<EntityUid> CollideExceptions = new();
/// <summary>
/// Sound to play when the turnstile admits a mob through.
/// </summary>
[DataField]
public SoundSpecifier? TurnSound = new SoundPathSpecifier("/Audio/Items/ratchet.ogg", AudioParams.Default.WithVolume(-6));
/// <summary>
/// Sound to play when the turnstile denies entry
/// </summary>
[DataField]
public SoundSpecifier? DenySound = new SoundPathSpecifier("/Audio/Machines/airlock_deny.ogg")
{
Params = new()
{
Volume = -7,
},
};
}
[Serializable, NetSerializable]
public enum TurnstileVisualLayers : byte
{
Base
}
[Serializable, NetSerializable]
public enum TurnstileStates : byte
{
Idle,
Deny,
Spin,
}