public sealed class VehicleInstanceOne vehicle in the world: who is in which seat.
Remarks
⚠ The transform half of this is blocked, and doc 28 predicted it. § Movement says mounts and vehicles are where doc 16's owed parent-relative replication stops being optional, "because a passenger replicating world coordinates fights the vehicle's own". That is item 69 in docs/overview.md and it is still owed, so nothing here touches a position: what is built is the seat model, which is the half that is not waiting on anything.
⚠ The driver leaving does not delete the vehicle or eject anybody. It becomes driverless, and a passenger may take the wheel if the definition allows. A taxi nobody may steer and a raft anybody may steer are both real, so it is a policy rather than a rule.
Fields and properties (5)
Events (1)
public Action<SeatChange>? ChangedRaised whenever somebody gets on or off.
Methods (10)
public VehicleInstance(Vehicle vehicle)Makes an empty one.
public PlayerId Occupant(int seat)Who is in a seat.
public int SeatOf(PlayerId player)Which seat somebody is in.
public bool Carries(PlayerId player)Whether somebody is aboard at all.
public SeatRefusal CanMount(PlayerId player, int seat, IRequirementContext? context = null)Whether somebody may take a seat, and why not.
public SeatRefusal Mount(PlayerId player, int seat, IRequirementContext? context = null, GameplayTagSet? grantTo = null)Gets on.
public int MountAny(PlayerId player, IRequirementContext? context = null, GameplayTagSet? grantTo = null)Takes the first seat that will have them.
public SeatRefusal Dismount(PlayerId player, GameplayTagSet? revokeFrom = null)Gets off.
public SeatRefusal MoveTo(PlayerId player, int seat, IRequirementContext? context = null, GameplayTagSet? tags = null)Moves somebody to another seat.
public int Eject(IReadOnlyDictionary<PlayerId, GameplayTagSet>? revokeFrom = null)Empties it. What despawning does.
Used by (1)
- VehicleTestsVixen.Gameplay.Movement.Tests