using Content.Shared.Damage; using Content.Shared.Vehicle.Systems; using Content.Shared.Whitelist; using Robust.Shared.GameStates; using Robust.Shared.Serialization; namespace Content.Shared.Vehicle.Components; /// /// Vehicles are objects that have the behavior of moving when a player "operates" them. /// The details of when the vehicle can operate and who the operator is are not defined here. /// This simply contains the baseline behavior of the vehicle itself. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true)] [Access(typeof(VehicleSystem))] public sealed partial class VehicleComponent : Component { /// /// The driver of this vehicle. /// [DataField, AutoNetworkedField] public EntityUid? Operator; /// /// Simple whitelist for determining who can operate this vehicle. /// [DataField, AutoNetworkedField] public EntityWhitelist? OperatorWhitelist; /// /// If true, damage to the vehicle will be transferred to the operator. /// This damage is modified by /// [DataField, AutoNetworkedField] public bool TransferDamage = true; /// /// A damage modifier set that adjusts the damage passed from the vehicle to the operator. /// [DataField, AutoNetworkedField] public DamageModifierSet? TransferDamageModifier; /// /// Whether the operator requires hands to operate this vehicle. /// [DataField, AutoNetworkedField] public bool RequiresHands = true; /// /// Whether the operator can attack while operating this vehicle. /// [DataField, AutoNetworkedField] public bool CanAttack; } [Serializable, NetSerializable] public enum VehicleVisuals : byte { HasOperator, // The vehicle has a valid operator CanRun // The vehicle can be moved by the operator (turned on :flushed:) }