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,29 @@
using Content.Shared.Shuttles.BUIStates;
using Content.Shared.Shuttles.Components;
using Content.Shared.Shuttles.Systems;
using Robust.Server.GameObjects;
using Robust.Shared.Map;
namespace Content.Server.Shuttles.Systems;
public sealed class RadarConsoleSystem : SharedRadarConsoleSystem
{
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RadarConsoleComponent, ComponentStartup>(OnRadarStartup);
}
private void OnRadarStartup(EntityUid uid, RadarConsoleComponent component, ComponentStartup args)
{
UpdateState(component);
}
protected override void UpdateState(RadarConsoleComponent component)
{
var radarState = new RadarConsoleBoundInterfaceState(component.MaxRange, component.Owner, new List<DockingInterfaceState>());
_uiSystem.GetUiOrNull(component.Owner, RadarConsoleUiKey.Key)?.SetState(radarState);
}
}