@@ -791,7 +791,7 @@ public abstract partial class InteractionTest
|
|||||||
gridUid = gridEnt;
|
gridUid = gridEnt;
|
||||||
gridComp = gridEnt.Comp;
|
gridComp = gridEnt.Comp;
|
||||||
var gridXform = SEntMan.GetComponent<TransformComponent>(gridUid);
|
var gridXform = SEntMan.GetComponent<TransformComponent>(gridUid);
|
||||||
Transform.SetWorldPosition(gridXform, pos.Position);
|
Transform.SetWorldPosition((gridUid, gridXform), pos.Position);
|
||||||
MapSystem.SetTile((gridUid, gridComp), SEntMan.GetCoordinates(coords ?? TargetCoords), tile);
|
MapSystem.SetTile((gridUid, gridComp), SEntMan.GetCoordinates(coords ?? TargetCoords), tile);
|
||||||
|
|
||||||
if (!MapMan.TryFindGridAt(pos, out _, out _))
|
if (!MapMan.TryFindGridAt(pos, out _, out _))
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ namespace Content.Server.Connection
|
|||||||
[Dependency] private readonly IChatManager _chatManager = default!;
|
[Dependency] private readonly IChatManager _chatManager = default!;
|
||||||
[Dependency] private readonly IHttpClientHolder _http = default!;
|
[Dependency] private readonly IHttpClientHolder _http = default!;
|
||||||
[Dependency] private readonly IAdminManager _adminManager = default!;
|
[Dependency] private readonly IAdminManager _adminManager = default!;
|
||||||
|
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||||
|
|
||||||
|
private GameTicker? _ticker;
|
||||||
|
|
||||||
private ISawmill _sawmill = default!;
|
private ISawmill _sawmill = default!;
|
||||||
private readonly Dictionary<NetUserId, TimeSpan> _temporaryBypasses = [];
|
private readonly Dictionary<NetUserId, TimeSpan> _temporaryBypasses = [];
|
||||||
@@ -288,8 +291,9 @@ namespace Content.Server.Connection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var wasInGame = EntitySystem.TryGet<GameTicker>(out var ticker) &&
|
_ticker ??= _entityManager.SystemOrNull<GameTicker>();
|
||||||
ticker.PlayerGameStatuses.TryGetValue(userId, out var status) &&
|
var wasInGame = _ticker != null &&
|
||||||
|
_ticker.PlayerGameStatuses.TryGetValue(userId, out var status) &&
|
||||||
status == PlayerGameStatus.JoinedGame;
|
status == PlayerGameStatus.JoinedGame;
|
||||||
var adminBypass = _cfg.GetCVar(CCVars.AdminBypassMaxPlayers) && adminData != null;
|
var adminBypass = _cfg.GetCVar(CCVars.AdminBypassMaxPlayers) && adminData != null;
|
||||||
var softPlayerCount = _plyMgr.PlayerCount;
|
var softPlayerCount = _plyMgr.PlayerCount;
|
||||||
|
|||||||
@@ -544,7 +544,7 @@ public sealed partial class ShuttleSystem
|
|||||||
comp.State = FTLState.Cooldown;
|
comp.State = FTLState.Cooldown;
|
||||||
comp.StateTime = StartEndTime.FromCurTime(_gameTiming, FTLCooldown);
|
comp.StateTime = StartEndTime.FromCurTime(_gameTiming, FTLCooldown);
|
||||||
_console.RefreshShuttleConsoles(uid);
|
_console.RefreshShuttleConsoles(uid);
|
||||||
_mapManager.SetMapPaused(mapId, false);
|
_mapSystem.SetPaused(mapId, false);
|
||||||
Smimsh(uid, xform: xform);
|
Smimsh(uid, xform: xform);
|
||||||
|
|
||||||
var ftlEvent = new FTLCompletedEvent(uid, _mapSystem.GetMap(mapId));
|
var ftlEvent = new FTLCompletedEvent(uid, _mapSystem.GetMap(mapId));
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ using Content.Server.Storage.Components;
|
|||||||
using Content.Server.Storage.EntitySystems;
|
using Content.Server.Storage.EntitySystems;
|
||||||
using Content.Shared.Access.Components;
|
using Content.Shared.Access.Components;
|
||||||
using Content.Shared.Station.Components;
|
using Content.Shared.Station.Components;
|
||||||
using Content.Shared.GameTicking.Components;
|
using Content.Shared.GameTicking.Components;
|
||||||
using Content.Shared.Coordinates;
|
|
||||||
|
|
||||||
namespace Content.Server.StationEvents.Events;
|
namespace Content.Server.StationEvents.Events;
|
||||||
|
|
||||||
public sealed class BluespaceLockerRule : StationEventSystem<BluespaceLockerRuleComponent>
|
public sealed class BluespaceLockerRule : StationEventSystem<BluespaceLockerRuleComponent>
|
||||||
{
|
{
|
||||||
[Dependency] private readonly BluespaceLockerSystem _bluespaceLocker = default!;
|
[Dependency] private readonly BluespaceLockerSystem _bluespaceLocker = default!;
|
||||||
|
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||||
|
|
||||||
protected override void Started(EntityUid uid, BluespaceLockerRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
|
protected override void Started(EntityUid uid, BluespaceLockerRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
|
||||||
{
|
{
|
||||||
@@ -25,12 +25,11 @@ public sealed class BluespaceLockerRule : StationEventSystem<BluespaceLockerRule
|
|||||||
}
|
}
|
||||||
|
|
||||||
RobustRandom.Shuffle(targets);
|
RobustRandom.Shuffle(targets);
|
||||||
|
|
||||||
foreach (var potentialLink in targets)
|
foreach (var potentialLink in targets)
|
||||||
{
|
{
|
||||||
if (HasComp<AccessReaderComponent>(potentialLink) ||
|
if (HasComp<AccessReaderComponent>(potentialLink) ||
|
||||||
HasComp<BluespaceLockerComponent>(potentialLink) ||
|
HasComp<BluespaceLockerComponent>(potentialLink) ||
|
||||||
!HasComp<StationMemberComponent>(potentialLink.ToCoordinates().GetGridUid(EntityManager)))
|
!HasComp<StationMemberComponent>(_transform.GetGrid(potentialLink)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var comp = AddComp<BluespaceLockerComponent>(potentialLink);
|
var comp = AddComp<BluespaceLockerComponent>(potentialLink);
|
||||||
|
|||||||
Reference in New Issue
Block a user