using Content.Shared.Vehicle.Components; using Content.Shared.Actions; using Content.Shared.Item; using Robust.Shared.Serialization; /// /// Stores the VehicleVisuals and shared event /// Nothing for a system but these need to be put somewhere in /// Content.Shared /// namespace Content.Shared.Vehicle { public sealed class SharedVehicleSystem : EntitySystem { public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnPickupAttempt); } private void OnPickupAttempt(EntityUid uid, InVehicleComponent component, GettingPickedUpAttemptEvent args) { if (component.Vehicle == null || !component.Vehicle.HasRider) return; if (component.Vehicle.Rider != args.User) args.Cancel(); } } /// /// Stores the vehicle's draw depth mostly /// [Serializable, NetSerializable] public enum VehicleVisuals : byte { /// /// What layer the vehicle should draw on (assumed integer) /// DrawDepth, /// /// Whether the wheels should be turning /// AutoAnimate } /// /// Raised when someone honks a vehicle horn /// public sealed class HonkActionEvent : InstantActionEvent { } /// /// Raised on the rider when someone is buckled to a vehicle. /// [Serializable, NetSerializable] public sealed class BuckledToVehicleEvent : EntityEventArgs { public EntityUid Vehicle; public EntityUid Rider; /// /// Whether they were buckled or unbuckled /// public bool Buckling; public BuckledToVehicleEvent(EntityUid vehicle, EntityUid rider, bool buckling) { Vehicle = vehicle; Rider = rider; Buckling = buckling; } } }