Dewarns access (#16666)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
TemporalOroboros
2023-07-22 21:19:51 -07:00
committed by GitHub
parent 415701fd74
commit df1dcb74ac
27 changed files with 438 additions and 407 deletions

View File

@@ -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 });
}
}
}