Clean up all missing EntitySystem proxy method uses (#38353)
This commit is contained in:
@@ -88,7 +88,7 @@ namespace Content.Server.Administration.Systems
|
||||
|
||||
private void AddAdminVerbs(GetVerbsEvent<Verb> args)
|
||||
{
|
||||
if (!EntityManager.TryGetComponent(args.User, out ActorComponent? actor))
|
||||
if (!TryComp(args.User, out ActorComponent? actor))
|
||||
return;
|
||||
|
||||
var player = actor.PlayerSession;
|
||||
@@ -395,7 +395,7 @@ namespace Content.Server.Administration.Systems
|
||||
|
||||
private void AddDebugVerbs(GetVerbsEvent<Verb> args)
|
||||
{
|
||||
if (!EntityManager.TryGetComponent(args.User, out ActorComponent? actor))
|
||||
if (!TryComp(args.User, out ActorComponent? actor))
|
||||
return;
|
||||
|
||||
var player = actor.PlayerSession;
|
||||
@@ -408,7 +408,7 @@ namespace Content.Server.Administration.Systems
|
||||
Text = Loc.GetString("delete-verb-get-data-text"),
|
||||
Category = VerbCategory.Debug,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
|
||||
Act = () => EntityManager.DeleteEntity(args.Target),
|
||||
Act = () => Del(args.Target),
|
||||
Impact = LogImpact.Medium,
|
||||
ConfirmationPopup = true
|
||||
};
|
||||
@@ -451,7 +451,7 @@ namespace Content.Server.Administration.Systems
|
||||
// Make Sentient verb
|
||||
if (_groupController.CanCommand(player, "makesentient") &&
|
||||
args.User != args.Target &&
|
||||
!EntityManager.HasComponent<MindContainerComponent>(args.Target))
|
||||
!HasComp<MindContainerComponent>(args.Target))
|
||||
{
|
||||
Verb verb = new()
|
||||
{
|
||||
@@ -517,7 +517,7 @@ namespace Content.Server.Administration.Systems
|
||||
|
||||
// Get Disposal tube direction verb
|
||||
if (_groupController.CanCommand(player, "tubeconnections") &&
|
||||
EntityManager.TryGetComponent(args.Target, out DisposalTubeComponent? tube))
|
||||
TryComp(args.Target, out DisposalTubeComponent? tube))
|
||||
{
|
||||
Verb verb = new()
|
||||
{
|
||||
@@ -544,7 +544,7 @@ namespace Content.Server.Administration.Systems
|
||||
}
|
||||
|
||||
if (_groupController.CanAdminMenu(player) &&
|
||||
EntityManager.TryGetComponent(args.Target, out ConfigurationComponent? config))
|
||||
TryComp(args.Target, out ConfigurationComponent? config))
|
||||
{
|
||||
Verb verb = new()
|
||||
{
|
||||
@@ -558,7 +558,7 @@ namespace Content.Server.Administration.Systems
|
||||
|
||||
// Add verb to open Solution Editor
|
||||
if (_groupController.CanCommand(player, "addreagent") &&
|
||||
EntityManager.HasComponent<SolutionContainerManagerComponent>(args.Target))
|
||||
HasComp<SolutionContainerManagerComponent>(args.Target))
|
||||
{
|
||||
Verb verb = new()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user