Add docking window to shuttle consoles (#8756)

* lewd

* A

* Realtime

* Sleepy dork

* Draw radar position

* Accurate infiltrator

* experiments

* Better drawing

* Labels

* I need aan adult

* Cleanup

* Show toggles

* display I guess

* A

* fix

* fix

* cleanupsies

* Bit more polish

* Make sure mass scanners actually work

* Remove dummy state

* fren

* opposite

* aghost crash

* comment

* What's in a name

* woops

* Show docking ports

* Dock highlighting

* Drawing dock

* Shitty docks

* Lots of docking drawing

* Autodock working

* dork

* More graceful shutdown

* zoomies

* Lines and distance change

* revert

* Good enough

* cleanup

* Fix default range

* Dock UI and loc update

* Update on undock

* Loc fixes
This commit is contained in:
metalgearsloth
2022-06-16 15:28:16 +10:00
committed by GitHub
parent 2c5f492e1a
commit 1e82d0c7ed
52 changed files with 1935 additions and 666 deletions

View File

@@ -0,0 +1,14 @@
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Added to entities when they are actively trying to dock with something else.
/// We track it because checking every dock constantly would be expensive.
/// </summary>
[RegisterComponent]
public sealed class AutoDockComponent : Component
{
/// <summary>
/// Track who has requested autodocking so we can know when to be removed.
/// </summary>
public HashSet<EntityUid> Requesters = new();
}

View File

@@ -0,0 +1,15 @@
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Added to <see cref="DockingComponent"/> that have recently undocked.
/// This checks for whether they've left the specified radius before allowing them to automatically dock again.
/// </summary>
[RegisterComponent]
public sealed class RecentlyDockedComponent : Component
{
[ViewVariables, DataField("lastDocked")]
public EntityUid LastDocked;
[ViewVariables(VVAccess.ReadWrite), DataField("radius")]
public float Radius = 1.5f;
}

View File

@@ -3,8 +3,14 @@ using Content.Shared.Shuttles.Components;
namespace Content.Server.Shuttles.Components
{
[RegisterComponent]
public sealed class ShuttleComponent : SharedShuttleComponent
public sealed class ShuttleComponent : Component
{
[ViewVariables]
public bool Enabled = true;
[ViewVariables]
public ShuttleMode Mode = ShuttleMode.Cruise;
/// <summary>
/// The cached thrust available for each cardinal direction
/// </summary>

View File

@@ -3,17 +3,10 @@ using Content.Shared.Shuttles.Components;
namespace Content.Server.Shuttles.Components
{
[RegisterComponent]
[ComponentReference(typeof(SharedShuttleConsoleComponent))]
internal sealed class ShuttleConsoleComponent : SharedShuttleConsoleComponent
public sealed class ShuttleConsoleComponent : SharedShuttleConsoleComponent
{
[ViewVariables]
public List<PilotComponent> SubscribedPilots = new();
/// <summary>
/// Whether the console can be used to pilot. Toggled whenever it gets powered / unpowered.
/// </summary>
[ViewVariables]
public bool Enabled { get; set; } = false;
public readonly List<PilotComponent> SubscribedPilots = new();
/// <summary>
/// How much should the pilot's eye be zoomed by when piloting using this console?

View File

@@ -1,4 +1,4 @@
using Content.Server.Shuttles.EntitySystems;
using Content.Server.Shuttles.Systems;
using Content.Shared.Damage;
namespace Content.Server.Shuttles.Components