More Changes

This commit is contained in:
Wrexbe
2021-12-05 10:56:17 -08:00
parent 2a3b7d809d
commit b9dd3be061
45 changed files with 140 additions and 140 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using Content.Server.Administration;
using Content.Shared.Administration;
@@ -29,12 +29,12 @@ namespace Content.Server.Verbs.Commands
var verbSystem = EntitySystem.Get<SharedVerbSystem>();
// get the 'player' entity (defaulting to command user, otherwise uses a uid)
EntityUid playerEntity = null;
EntityUid playerEntity = default;
if (!int.TryParse(args[0], out var intPlayerUid))
{
if (args[0] == "self" && shell.Player?.AttachedEntity != null)
{
playerEntity = shell.Player.AttachedEntity;
playerEntity = shell.Player.AttachedEntityUid.Value;
}
else
{
@@ -54,14 +54,14 @@ namespace Content.Server.Verbs.Commands
return;
}
if (playerEntity == null)
if (playerEntity == default)
{
shell.WriteError(Loc.GetString("invoke-verb-command-invalid-player-entity"));
return;
}
var entUid = new EntityUid(intUid);
if (!entityManager.EntityExists(entUid)
if (!entityManager.EntityExists(entUid))
{
shell.WriteError(Loc.GetString("invoke-verb-command-invalid-target-entity"));
return;