Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
41d2d3f
Stable and tested version of the remote access system (remote grids) …
Proximitron Aug 27, 2026
e192230
Cleanup for access of the camera system (to ensure cameras, even if p…
Proximitron Aug 27, 2026
5ce8310
Merge branch 'ss14Starlight:starlight-dev' into remote-grid-access
Proximitron Aug 27, 2026
4fc6737
Trying to reformat it?
Proximitron Aug 27, 2026
5ac70c9
Taking suggestion to remove region
Proximitron Aug 27, 2026
39d5388
Cleanup as required by validators
Proximitron Aug 27, 2026
5c982b0
Merge branch 'remote-grid-access' of https://github.com/Proximitron/s…
Proximitron Aug 27, 2026
58f535e
Cleanup to make very sure we don't accept only specific uid's of the …
Proximitron Aug 27, 2026
527b2b3
Making EditorConfig check happy by putting that on a single line
Proximitron Aug 27, 2026
205bb78
Comments and cleaner deauthorization (i don't believe it is nessesary…
Proximitron Aug 27, 2026
726be64
Same code, tested again, as partials.
Proximitron Aug 30, 2026
77c1774
// ReSharper disable CheckNamespace
Proximitron Aug 30, 2026
f2622fc
Merge branch 'starlight-dev' into remote-grid-access
Proximitron Sep 1, 2026
1bb365f
Merge branch 'ss14Starlight:starlight-dev' into remote-grid-access
Proximitron Sep 2, 2026
58a4f11
Update Content.Server/Silicons/StationAi/StationAiSystem.cs
Proximitron Sep 2, 2026
762ae70
Update Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs
Proximitron Sep 2, 2026
8fd9a50
Update Content.Shared/Silicons/StationAi/SharedStationAiSystem.cs
Proximitron Sep 2, 2026
ec25298
Add comment for popout support in ShuttleConsole UI
Proximitron Sep 2, 2026
7e4d2c8
Clarify popout disposal in Dispose method
Proximitron Sep 2, 2026
9bda769
Update Content.Server/Silicons/StationAi/StationAiSystem.cs
Proximitron Sep 2, 2026
7811501
Fix to starlight comments
Proximitron Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,27 @@
using Robust.Client.UserInterface;
using Robust.Shared.Map;

#region Starlight
using Content.Shared.Medical.CrewMonitoring;
using Content.Shared.Silicons.StationAi;
using Robust.Shared.Player;
#endregion Starlight
Comment thread
Proximitron marked this conversation as resolved.
Outdated

namespace Content.Client.Shuttles.BUI;

[UsedImplicitly]
public sealed class ShuttleConsoleBoundUserInterface : BoundUserInterface
{
#region Starlight
[Dependency] private ISharedPlayerManager _playerManager = default!;

Check warning on line 21 in Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Make field readonly Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs"},"region":{"endColumn":61,"endLine":21,"startColumn":47,"startLine":21}}}],"message":{"text":"Make field readonly"},"properties":{},"ruleId":"IDE0044","ruleIndex":652}
#endregion Starlight

[ViewVariables]
private ShuttleConsoleWindow? _window;

public ShuttleConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
IoCManager.InjectDependencies(this); // Starlight

Check warning on line 29 in Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Use expression body for constructor Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs"},"region":{"endColumn":45,"endLine":29,"startColumn":9,"startLine":29}}}],"message":{"text":"Use expression body for constructor"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs"},"region":{"endColumn":6,"endLine":30,"startColumn":5,"startLine":27}}}],"ruleId":"IDE0021","ruleIndex":655}
}

protected override void Open()
Expand All @@ -27,6 +38,7 @@
_window.RequestBeaconFTL += OnFTLBeaconRequest;
_window.DockRequest += OnDockRequest;
_window.UndockRequest += OnUndockRequest;
_window.RadarClicked += OnRadarClicked; // Starlight
}

private void OnUndockRequest(NetEntity entity)
Expand Down Expand Up @@ -70,10 +82,25 @@

if (disposing)
{
// Starlight - start
if (_window != null)

Check warning on line 86 in Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Null check can be simplified Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs"},"region":{"endColumn":15,"endLine":86,"startColumn":13,"startLine":86}}}],"message":{"text":"Null check can be simplified"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/BUI/ShuttleConsoleBoundUserInterface.cs"},"region":{"endColumn":56,"endLine":87,"startColumn":13,"startLine":86}}}],"ruleId":"IDE0031","ruleIndex":660}
_window.RadarClicked -= OnRadarClicked;
// Starlight - end
_window?.DisposePopOut(); // Starlight: close the popout if exists
}
}

#region Starlight
private void OnRadarClicked(EntityCoordinates coordinates)
{
var local = _playerManager.LocalEntity;
if (local is null || !EntMan.HasComponent<StationAiHeldComponent>(local.Value))
return;

SendMessage(new CrewMonitoringWarpRequestMessage(EntMan.GetNetCoordinates(coordinates)));
}
#endregion Starlight

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
Expand Down
15 changes: 15 additions & 0 deletions Content.Client/Shuttles/UI/NavScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
private EntityUid? _consoleEntity; // Entity of controlling console
private EntityUid? _shuttleEntity;

#region Starlight
public event Action<EntityCoordinates>? OnRadarClick;
#endregion Starlight

public NavScreen()
{
RobustXamlLoader.Load(this);
Expand All @@ -30,6 +34,10 @@

DockToggle.OnToggled += OnDockTogglePressed;
DockToggle.Pressed = NavRadar.ShowDocks;

// Starlight - start
NavRadar.OnRadarClick += OnRadarClickPressed;
// Starlight - end
}

public void SetShuttle(EntityUid? shuttle)
Expand All @@ -55,6 +63,13 @@
args.Button.Pressed = NavRadar.ShowDocks;
}

#region Starlight
private void OnRadarClickPressed(EntityCoordinates coordinates)
{
OnRadarClick?.Invoke(coordinates);

Check warning on line 69 in Content.Client/Shuttles/UI/NavScreen.xaml.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Use expression body for method Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/UI/NavScreen.xaml.cs"},"region":{"endColumn":43,"endLine":69,"startColumn":9,"startLine":69}}}],"message":{"text":"Use expression body for method"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/UI/NavScreen.xaml.cs"},"region":{"endColumn":6,"endLine":70,"startColumn":5,"startLine":67}}}],"ruleId":"IDE0022","ruleIndex":645}
}
#endregion

public void UpdateState(NavInterfaceState scc, DockingPortStates dockingPortStates) // Starlight: +dockingPortStates
{
NavRadar.UpdateState(scc, dockingPortStates); // Starlight: +dockingPortStates
Expand Down
13 changes: 13 additions & 0 deletions Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
public event Action<NetEntity, NetEntity>? DockRequest;
public event Action<NetEntity>? UndockRequest;

#region Starlight
public event Action<EntityCoordinates>? RadarClicked;
#endregion Starlight

public ShuttleConsoleWindow()
{
RobustXamlLoader.Load(this);
Expand All @@ -47,6 +51,8 @@
NavModeButton.Pressed = true;
SetupMode(_mode);

NavContainer.OnRadarClick += OnRadarClick; // Starlight

MapContainer.RequestFTL += (coords, angle) =>
{
RequestFTL?.Invoke(coords, angle);
Expand All @@ -68,6 +74,13 @@
};
}

#region Starlight
private void OnRadarClick(EntityCoordinates coordinates)
{
RadarClicked?.Invoke(coordinates);

Check warning on line 80 in Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Use expression body for method Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs"},"region":{"endColumn":43,"endLine":80,"startColumn":9,"startLine":80}}}],"message":{"text":"Use expression body for method"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs"},"region":{"endColumn":6,"endLine":81,"startColumn":5,"startLine":78}}}],"ruleId":"IDE0022","ruleIndex":645}
}
#endregion

private void ClearModes(ShuttleConsoleMode mode)
{
if (mode != ShuttleConsoleMode.Nav)
Expand Down
16 changes: 13 additions & 3 deletions Content.Client/Silicons/StationAi/StationAiOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,25 @@ protected override void Draw(in OverlayDrawArgs args)

// Check for cross-grid viewing (e.g., Abductor remote eye) BEFORE getting gridUid
if (_entManager.TryGetComponent(playerEnt, out StationAiOverlayComponent? stationAiOverlay)
&& stationAiOverlay.AllowCrossGrid
&& (stationAiOverlay.AllowCrossGrid || _entManager.HasComponent<StationAiHeldComponent>(playerEnt))
&& _entManager.TryGetComponent(playerEnt, out RelayInputMoverComponent? relay))
playerEnt = relay.RelayEntity;

_entManager.TryGetComponent(playerEnt, out StationAiOverlayComponent? relayStationAiOverlay);
_entManager.TryGetComponent(playerEnt, out TransformComponent? playerXform);

// We try to figure out where the AI is even coming from to make sure we don't render cameras for remote grids without access
EntityUid? sourceGrid = null;
var stationAiSystem = _entManager.System<SharedStationAiSystem>();
if (_player.LocalEntity is EntityUid localEntity)
if (stationAiSystem.TryGetCore(localEntity, out var core) && core.Comp is not null)
sourceGrid = _entManager.GetComponent<TransformComponent>(core.Owner).GridUid;

var gridUid = playerXform?.GridUid
?? (stationAiOverlay is { AllowCrossGrid: true } ? _lastGridUid : EntityUid.Invalid);
?? (stationAiOverlay is { AllowCrossGrid: true } ||
_entManager.HasComponent<StationAiHeldComponent>(_player.LocalEntity)
? _lastGridUid
: EntityUid.Invalid);
if (gridUid != EntityUid.Invalid)
_lastGridUid = gridUid;

Expand Down Expand Up @@ -113,7 +123,7 @@ protected override void Draw(in OverlayDrawArgs args)
_visibleTiles.Clear();
// Starlight - start
_visibleTileTags.Clear();
_entManager.System<StationAiVisionSystem>().GetView((gridUid, broadphase, grid), worldBounds, _visibleTiles, _visibleTileTags);
_entManager.System<StationAiVisionSystem>().GetView((gridUid, broadphase, grid), worldBounds, _visibleTiles, _visibleTileTags, sourceGrid: sourceGrid);
// Starlight - end
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Server.DeviceNetwork.Components;
using Content.Server.Station.Systems;
using Content.Shared.DeviceNetwork.Events;
using Content.Shared.Maps;
using JetBrains.Annotations;
using Robust.Shared.Map;

Expand All @@ -13,6 +14,9 @@
public sealed partial class StationLimitedNetworkSystem : EntitySystem
{
[Dependency] private StationSystem _stationSystem = default!;
#region Starlight
[Dependency] private SharedGridAccessSystem _gridAccess = default!;
#endregion
public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -59,12 +63,25 @@
if (!component.StationId.HasValue)
TrySetStationId(uid, component);

if (!CheckStationId(args.Sender, component.AllowNonStationPackets, component.StationId))
if (!CheckStationId(args.Sender, component.AllowNonStationPackets, component.StationId) &&
!CanAccessSenderGrid(uid, args.Sender)) // Starlight: allow access if the sender and receiver are on grids that can access each other
{
args.Cancel();
}
}

#region Starlight
private bool CanAccessSenderGrid(EntityUid receiver, EntityUid sender)
{
var receiverGrid = Transform(receiver).GridUid;
var senderGrid = Transform(sender).GridUid;

return receiverGrid is { } targetGrid && senderGrid is { } sourceGrid &&
(_gridAccess.CanAccess(sourceGrid, targetGrid) ||

Check failure on line 80 in Content.Server/DeviceNetwork/Systems/StationLimitedNetworkSystem.cs

View workflow job for this annotation

GitHub Actions / EditorConfig Check

[EditorConfig] reported by reviewdog 🐶 Wrong amount of left-padding spaces(want multiple of 4) Raw Output: Content.Server/DeviceNetwork/Systems/StationLimitedNetworkSystem.cs:80:0: error: Wrong amount of left-padding spaces(want multiple of 4)
_gridAccess.CanAccess(targetGrid, sourceGrid));
}
#endregion Starlight

/// <summary>
/// Compares the station IDs of the sending and receiving network components.
/// Returns false if either of them doesn't have a station ID or if their station ID isn't equal.
Expand Down
27 changes: 17 additions & 10 deletions Content.Server/Holopad/HolopadSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ private void OnHolopadStartNewCall(Entity<HolopadComponent> source, ref HolopadS
if (!TryComp<TelephoneComponent>(receiver, out var receiverTelephone))
return;

// Starlight - start
if (HasComp<StationAiHeldComponent>(args.Actor) &&
!_stationAiSystem.CanAccessGrid(args.Actor, Transform(receiver).GridUid))
return;
// Starlight - end
LinkHolopadToUser(source, args.Actor);
_telephoneSystem.CallTelephone((source, sourceTelephone), (receiver, receiverTelephone), args.Actor);
}
Expand All @@ -127,15 +132,6 @@ private void OnHolopadAnswerCall(Entity<HolopadComponent> receiver, ref HolopadA
if (_stationAiSystem.TryGetCore(args.Actor, out var stationAiCore))
_userInterfaceSystem.CloseUi(receiver.Owner, HolopadUiKey.AiRequestWindow, args.Actor);

// Try to warn the AI if the source of the call is out of its range
if (TryComp<TelephoneComponent>(stationAiCore, out var stationAiTelephone) &&
TryComp<TelephoneComponent>(source, out var sourceTelephone) &&
!_telephoneSystem.IsSourceInRangeOfReceiver((stationAiCore.Owner, stationAiTelephone), (source.Value.Owner, sourceTelephone)))
{
_popupSystem.PopupEntity(Loc.GetString("holopad-ai-is-unable-to-reach-holopad"), receiver, args.Actor);
return;
}

ActivateProjector(source.Value, args.Actor);
}

Expand Down Expand Up @@ -673,8 +669,18 @@ private void ActivateProjector(Entity<HolopadComponent> entity, EntityUid user)

var source = new Entity<TelephoneComponent>(stationAiCore, stationAiTelephone);

// Starlight - start
// We check if the AI has grid access. Normal projector call are range limited, not limited by grid access. The AI is special.
if (!_stationAiSystem.CanAccessGrid(user, Transform(entity).GridUid))
{
_popupSystem.PopupEntity(Loc.GetString("holopad-ai-is-unable-to-activate-projector"), receiver, user);
return;
}
// Starlight - end

// Check if the AI is unable to activate the projector (unlikely this will ever pass; its just a safeguard)
if (!_telephoneSystem.IsSourceInRangeOfReceiver(source, receiver))
if (!_telephoneSystem.IsTelephonePowered(source) ||
!_telephoneSystem.IsTelephonePowered(receiver)) // Starlight: check replaced with sensible check based on power
{
_popupSystem.PopupEntity(Loc.GetString("holopad-ai-is-unable-to-activate-projector"), receiver, user);
return;
Expand All @@ -685,6 +691,7 @@ private void ActivateProjector(Entity<HolopadComponent> entity, EntityUid user)

var callOptions = new TelephoneCallOptions()
{
IgnoreRange = true, // Starlight: we do check things in advance and have safeguards in place
ForceConnect = true,
MuteReceiver = true
};
Expand Down
89 changes: 86 additions & 3 deletions Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,24 @@
using Content.Server.Shuttles.Events;
using Content.Shared.Station.Components;
using Content.Shared.UserInterface;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared.Maps;

namespace Content.Server.Shuttles.Systems;

public sealed partial class ShuttleConsoleSystem
{
#region Starlight
[Dependency] private SharedGridAccessSystem _gridAccess = default!;
private readonly Dictionary<EntityUid, (EntityUid SourceGrid, EntityUid TargetGrid)> _remoteGridAccess = new();

Check failure on line 16 in Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

View workflow job for this annotation

GitHub Actions / EditorConfig Check

[EditorConfig] reported by reviewdog 🐶 Trailing whitespace Raw Output: Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs:16:0: error: Trailing whitespace
private void OnDroneConsoleStartup(EntityUid uid, DroneConsoleComponent component, ComponentStartup args)
{
UpdateRemoteGridAccess(uid, component);

Check warning on line 19 in Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Use expression body for method Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs"},"region":{"endColumn":48,"endLine":19,"startColumn":9,"startLine":19}}}],"message":{"text":"Use expression body for method"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs"},"region":{"endColumn":6,"endLine":20,"startColumn":5,"startLine":17}}}],"ruleId":"IDE0022","ruleIndex":663}
}
#endregion Starlight

/// <summary>
/// Gets the drone console target if applicable otherwise returns itself.
/// </summary>
Expand All @@ -30,13 +43,17 @@

while (query.MoveNext(out var uid, out var comp))
{
comp.Entity = GetShuttleConsole(uid, comp);
// Starlight - start
UpdateRemoteGridAccess(uid, comp);
// Starlight - end
Comment thread
Proximitron marked this conversation as resolved.
Outdated
}
}

private void OnDronePilotConsoleOpen(EntityUid uid, DroneConsoleComponent component, AfterActivatableUIOpenEvent args)
{
component.Entity = GetShuttleConsole(uid);
// Starlight - start
UpdateRemoteGridAccess(uid, component);

Check warning on line 55 in Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Use expression body for method Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs"},"region":{"endColumn":48,"endLine":55,"startColumn":9,"startLine":55}}}],"message":{"text":"Use expression body for method"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs"},"region":{"endColumn":6,"endLine":57,"startColumn":5,"startLine":52}}}],"ruleId":"IDE0022","ruleIndex":663}
// Starlight - end
}

private void OnDronePilotConsoleClose(EntityUid uid, DroneConsoleComponent component, BoundUIClosedEvent args)
Expand All @@ -48,8 +65,74 @@

private void OnCargoGetConsole(EntityUid uid, DroneConsoleComponent component, ref ConsoleShuttleEvent args)
{
args.Console = GetShuttleConsole(uid, component);
// Starlight - start
UpdateRemoteGridAccess(uid, component);
// Starlight - end
args.Console = component.Entity;
}

#region Starlight
private void UpdateRemoteGridAccess(EntityUid uid, DroneConsoleComponent component)
{
// Starlight - start
Comment thread
Proximitron marked this conversation as resolved.
Outdated
var targetConsole = GetShuttleConsole(uid, component);
var sourceGrid = Transform(uid).GridUid;
var targetGrid = targetConsole is { } target
? Transform(target).GridUid
: null;

if (_remoteGridAccess.TryGetValue(uid, out var previous) &&
(sourceGrid != previous.SourceGrid || targetGrid != previous.TargetGrid ||
!IsConsoleOperational(uid) || targetConsole is not { } currentTarget || !IsConsoleOperational(currentTarget)))

Check failure on line 86 in Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

View workflow job for this annotation

GitHub Actions / EditorConfig Check

[EditorConfig] reported by reviewdog 🐶 Wrong amount of left-padding spaces(want multiple of 4) Raw Output: Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs:86:0: error: Wrong amount of left-padding spaces(want multiple of 4)
{
RemoveRemoteGridAccess(uid);
}

component.Entity = targetConsole;

if (sourceGrid is not { } source || targetGrid is not { } targetUid ||
targetConsole is not { } console ||
!IsConsoleOperational(uid) || !IsConsoleOperational(console))
{
return;
}

if (_remoteGridAccess.ContainsKey(uid))
return;

_gridAccess.AddAccessibleGrid(source, targetUid);
_remoteGridAccess[uid] = (source, targetUid);
Comment thread
Proximitron marked this conversation as resolved.
// Starlight - end
}

private void RemoveRemoteGridAccess(EntityUid uid)
{
// Starlight - start
if (!_remoteGridAccess.Remove(uid, out var access))
return;

foreach (var other in _remoteGridAccess.Values)
{
if (other != access)
continue;

return;
}

_gridAccess.RemoveAccessibleGrid(access.SourceGrid, access.TargetGrid);
// Starlight - end
}

private bool IsConsoleOperational(EntityUid uid)
{
// Starlight - start
return TryComp<ShuttleConsoleComponent>(uid, out _) &&

Check warning on line 129 in Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Use expression body for method Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs"},"region":{"endColumn":51,"endLine":132,"startColumn":9,"startLine":129}}}],"message":{"text":"Use expression body for method"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs"},"region":{"endColumn":6,"endLine":134,"startColumn":5,"startLine":126}}}],"ruleId":"IDE0022","ruleIndex":663}
MetaData(uid).EntityLifeStage < EntityLifeStage.Terminating &&

Check failure on line 130 in Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

View workflow job for this annotation

GitHub Actions / EditorConfig Check

[EditorConfig] reported by reviewdog 🐶 Wrong amount of left-padding spaces(want multiple of 4) Raw Output: Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs:130:0: error: Wrong amount of left-padding spaces(want multiple of 4)
Transform(uid).Anchored &&

Check failure on line 131 in Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

View workflow job for this annotation

GitHub Actions / EditorConfig Check

[EditorConfig] reported by reviewdog 🐶 Wrong amount of left-padding spaces(want multiple of 4) Raw Output: Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs:131:0: error: Wrong amount of left-padding spaces(want multiple of 4)
this.IsPowered(uid, EntityManager);

Check failure on line 132 in Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

View workflow job for this annotation

GitHub Actions / EditorConfig Check

[EditorConfig] reported by reviewdog 🐶 Wrong amount of left-padding spaces(want multiple of 4) Raw Output: Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs:132:0: error: Wrong amount of left-padding spaces(want multiple of 4)
// Starlight - end
}
#endregion Starlight

/// <summary>
/// Gets the relevant shuttle console to proxy from the drone console.
Expand Down
Loading
Loading