CatStation/Content.Shared/Vehicle/Components/ContainerVehicleEntryComponent.cs
AndrewFenriz f327d7992e
Add generic container vehicle entry and exit handling (#45354)
* remove PilotSlot

* cleanup mechcomp

* move enter/eject to VehicleSystem

* ContainerVehicleEntryComponent

* move DragDrop to VehicleSystem.Entry

* and again

* move enter verb

* move exit...

* move to shared

* docs

* [Access(typeof(VehicleSystem))]

* Update Resources/Locale/en-US/mech/mech.ftl

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>

* move popups to component

* move all events to VehicleEvents

* no more UsedImplicitly

* fix proto :0

* fix EntryDeniedPopup

* update Entry and Operator

* entityquery

---------

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
2026-08-15 00:32:39 +00:00

36 lines
1.1 KiB
C#

using Content.Shared.Vehicle.Systems;
using Robust.Shared.GameStates;
namespace Content.Shared.Vehicle.Components;
/// <summary>
/// Enables and configures interaction-based entry and operator removal for a <see cref="ContainerVehicleComponent"/>.
/// </summary>
[RegisterComponent, NetworkedComponent]
[Access(typeof(VehicleSystem))]
public sealed partial class ContainerVehicleEntryComponent : Component
{
/// <summary>
/// Delay before an entry interaction completes.
/// </summary>
[DataField]
public float EntryDelay = 3;
/// <summary>
/// Delay before an operator removal interaction completes.
/// </summary>
[DataField]
public float ExitDelay = 3;
/// <summary>
/// Popup shown when an entity cannot become the vehicle's operator.
/// </summary>
[DataField]
public LocId EntryDeniedPopup = "container-vehicle-entry-denied";
/// <summary>
/// Popup shown when another entity starts removing the vehicle's operator.
/// </summary>
[DataField]
public LocId OperatorRemovalPopup = "container-vehicle-operator-removal-started";
}