Files
tbd-station-14/Content.Shared/Clothing/Components/PilotedClothingComponent.cs
Tayrtahn e5ef2a358c Implement vital chef's hat functionality (#25950)
* Implement crucial chef's hat functionality

* Unified stopping code and added events.

* Added documentation to events

* Rerun tests

* Made review changes, and fixed potential desync bug.

* Update whitelist
2024-06-18 20:59:37 +10:00

39 lines
1.1 KiB
C#

using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
namespace Content.Shared.Clothing.Components;
/// <summary>
/// Allows an entity stored in this clothing item to pass inputs to the entity wearing it.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class PilotedClothingComponent : Component
{
/// <summary>
/// Whitelist for entities that are allowed to act as pilots when inside this entity.
/// </summary>
[DataField]
public EntityWhitelist? PilotWhitelist;
/// <summary>
/// Should movement input be relayed from the pilot to the target?
/// </summary>
[DataField]
public bool RelayMovement = true;
/// <summary>
/// Reference to the entity contained in the clothing and acting as pilot.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? Pilot;
/// <summary>
/// Reference to the entity wearing this clothing who will be controlled by the pilot.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? Wearer;
public bool IsActive => Pilot != null && Wearer != null;
}