Add minimum distance for pilot breaking (#5232)
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
@@ -12,12 +13,19 @@ namespace Content.Shared.Shuttles
|
||||
/// Stores what shuttle this entity is currently piloting.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent()]
|
||||
[NetworkedComponent]
|
||||
public sealed class PilotComponent : Component
|
||||
{
|
||||
public override string Name => "Pilot";
|
||||
[ViewVariables] public SharedShuttleConsoleComponent? Console { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Where we started piloting from to check if we should break from moving too far.
|
||||
/// </summary>
|
||||
[ViewVariables] public EntityCoordinates? Position { get; set; }
|
||||
|
||||
public const float BreakDistance = 0.25f;
|
||||
|
||||
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
|
||||
{
|
||||
base.HandleComponentState(curState, nextState);
|
||||
|
||||
Reference in New Issue
Block a user