Content arch (#20107)

Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
This commit is contained in:
metalgearsloth
2023-11-23 14:34:37 +11:00
committed by GitHub
parent 7d2e8c7087
commit 93bd9972f1
33 changed files with 331 additions and 109 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);
}
}
}