diff --git a/Content.Server/Research/Systems/ResearchSystem.cs b/Content.Server/Research/Systems/ResearchSystem.cs index 5cad4d51ba..7c7aefc2c3 100644 --- a/Content.Server/Research/Systems/ResearchSystem.cs +++ b/Content.Server/Research/Systems/ResearchSystem.cs @@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using Content.Server.Administration.Logs; using Content.Server.Radio.EntitySystems; +using Content.Shared._DV.Shuttles.Components; // DeltaV using Content.Shared.Access.Systems; using Content.Shared.Popups; using Content.Shared.Research.Components; @@ -103,6 +104,18 @@ namespace Content.Server.Research.Systems if (clientXform.GridUid is not { } grid) return ClientLookup; + // Begin DeltaV Additions - use legacy behaviour if the grid has GlobalResearchGridComponent + if (HasComp(grid)) + { + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var comp)) + { + ClientLookup.Add((uid, comp)); + } + return ClientLookup; + } + // End DeltaV Additions + _lookup.GetGridEntities(grid, ClientLookup); return ClientLookup; } diff --git a/Content.Shared/_DV/Shuttles/Components/GlobalResearchGridComponent.cs b/Content.Shared/_DV/Shuttles/Components/GlobalResearchGridComponent.cs new file mode 100644 index 0000000000..dc8a74852b --- /dev/null +++ b/Content.Shared/_DV/Shuttles/Components/GlobalResearchGridComponent.cs @@ -0,0 +1,10 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared._DV.Shuttles.Components; + +/// +/// Makes a grid support research clients using all servers, even cross-map. +/// Useful for antag shuttles that need to make use of research. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class GlobalResearchGridComponent : Component; diff --git a/Resources/Maps/_DV/Shuttles/roboneuroticist_ship.yml b/Resources/Maps/_DV/Shuttles/roboneuroticist_ship.yml index 51a564ed58..491f8a14a4 100644 --- a/Resources/Maps/_DV/Shuttles/roboneuroticist_ship.yml +++ b/Resources/Maps/_DV/Shuttles/roboneuroticist_ship.yml @@ -337,6 +337,7 @@ entities: - 0 chunkSize: 4 - type: GasTileOverlay + - type: GlobalResearchGrid - proto: ActionToggleInternals entities: - uid: 29