let SRN bypass research grid check

This commit is contained in:
deltanedas 2025-05-18 18:30:24 +01:00
parent 9815d4c633
commit e66b0b93de
3 changed files with 24 additions and 0 deletions

View File

@ -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<GlobalResearchGridComponent>(grid))
{
var query = EntityQueryEnumerator<ResearchServerComponent>();
while (query.MoveNext(out var uid, out var comp))
{
ClientLookup.Add((uid, comp));
}
return ClientLookup;
}
// End DeltaV Additions
_lookup.GetGridEntities(grid, ClientLookup);
return ClientLookup;
}

View File

@ -0,0 +1,10 @@
using Robust.Shared.GameStates;
namespace Content.Shared._DV.Shuttles.Components;
/// <summary>
/// Makes a grid support research clients using all servers, even cross-map.
/// Useful for antag shuttles that need to make use of research.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class GlobalResearchGridComponent : Component;

View File

@ -337,6 +337,7 @@ entities:
- 0
chunkSize: 4
- type: GasTileOverlay
- type: GlobalResearchGrid
- proto: ActionToggleInternals
entities:
- uid: 29