Files
tbd-station-14/Content.Shared/Doors/Components/TurnstileComponent.cs
Nemanja 712954f1c4 Turnstiles (#36313)
* construction rotation fix

* Turnstiles

* renaming

* review-slarticodefast-1

* mild attempts to fix (sorry sloth)

* move some more shit

* Remove engine dependency

* grid agnostic

* remove debug string

* fix json

* Update Content.Shared/Movement/Pulling/Systems/PullingSystem.cs

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>

* Update Content.Shared/Movement/Pulling/Systems/PullingSystem.cs

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>

* remove pass delay for mispredict reasons.

* most minor of changes

* Give directional indicator on examine

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2025-04-24 13:39:40 +02:00

72 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>
/// Maintained hashset of entities currently passing through the turnstile.
/// </summary>
[DataField, AutoNetworkedField]
public HashSet<EntityUid> CollideExceptions = new();
/// <summary>
/// default state of the turnstile sprite.
/// </summary>
[DataField]
public string DefaultState = "turnstile";
/// <summary>
/// animation state of the turnstile spinning.
/// </summary>
[DataField]
public string SpinState = "operate";
/// <summary>
/// animation state of the turnstile denying entry.
/// </summary>
[DataField]
public string DenyState = "deny";
/// <summary>
/// Sound to play when the turnstile admits a mob through.
/// </summary>
[DataField]
public SoundSpecifier? TurnSound = new SoundPathSpecifier("/Audio/Items/ratchet.ogg");
/// <summary>
/// Sound to play when the turnstile denies entry
/// </summary>
[DataField]
public SoundSpecifier? DenySound = new SoundPathSpecifier("/Audio/Machines/airlock_deny.ogg");
}
[Serializable, NetSerializable]
public enum TurnstileVisualLayers : byte
{
Base
}