Replace EntityUid parsing with NetEntity (#23474)

* Replace EntityUid parsing with NetEntity

* fix

* Other changes required for arch

* And anothher
This commit is contained in:
Leon Friedrich
2024-01-03 19:04:31 -05:00
committed by GitHub
parent 292026c584
commit 9bff44d141
15 changed files with 88 additions and 74 deletions

View File

@@ -33,15 +33,15 @@ namespace Content.Server.Administration.Commands
return;
}
var target = new EntityUid(targetId);
var targetNet = new NetEntity(targetId);
if (!target.IsValid() || !_entities.EntityExists(target))
if (!_entities.TryGetEntity(targetNet, out var target))
{
shell.WriteLine(Loc.GetString("shell-invalid-entity-id"));
return;
}
_entities.System<MindSystem>().ControlMob(player.UserId, target);
_entities.System<MindSystem>().ControlMob(player.UserId, target.Value);
}
}
}