Dewarns access (#16666)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -93,7 +93,7 @@ namespace Content.Server.Sandbox
|
||||
if (e.NewStatus != SessionStatus.Connected || e.OldStatus != SessionStatus.Connecting)
|
||||
return;
|
||||
|
||||
RaiseNetworkEvent(new MsgSandboxStatus {SandboxAllowed = IsSandboxEnabled}, e.Session.ConnectedClient);
|
||||
RaiseNetworkEvent(new MsgSandboxStatus { SandboxAllowed = IsSandboxEnabled }, e.Session.ConnectedClient);
|
||||
}
|
||||
|
||||
private void SandboxRespawnReceived(MsgSandboxRespawn message, EntitySessionEventArgs args)
|
||||
@@ -113,7 +113,7 @@ namespace Content.Server.Sandbox
|
||||
return;
|
||||
|
||||
var player = _playerManager.GetSessionByChannel(args.SenderSession.ConnectedClient);
|
||||
if (player.AttachedEntity is not {} attached)
|
||||
if (player.AttachedEntity is not { } attached)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -130,17 +130,17 @@ namespace Content.Server.Sandbox
|
||||
}
|
||||
else if (TryComp<PdaComponent>(slotEntity, out var pda))
|
||||
{
|
||||
if (pda.ContainedId == null)
|
||||
if (pda.ContainedId is null)
|
||||
{
|
||||
var newID = CreateFreshId();
|
||||
if (TryComp<ItemSlotsComponent>(pda.Owner, out var itemSlots))
|
||||
if (TryComp<ItemSlotsComponent>(slotEntity, out var itemSlots))
|
||||
{
|
||||
_slots.TryInsert(slotEntity.Value, pda.IdSlot, newID, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UpgradeId(pda.ContainedId.Owner);
|
||||
UpgradeId(pda.ContainedId!.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,7 +189,7 @@ namespace Content.Server.Sandbox
|
||||
|
||||
private void UpdateSandboxStatusForAll()
|
||||
{
|
||||
RaiseNetworkEvent(new MsgSandboxStatus {SandboxAllowed = IsSandboxEnabled});
|
||||
RaiseNetworkEvent(new MsgSandboxStatus { SandboxAllowed = IsSandboxEnabled });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user