Bunch more resolves removed.
This commit is contained in:
@@ -29,6 +29,8 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
[ComponentReference(typeof(IDisposalTubeComponent))]
|
||||
public class DisposalRouterComponent : DisposalJunctionComponent, IActivate
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
public override string Name => "DisposalRouter";
|
||||
|
||||
[ViewVariables]
|
||||
@@ -36,7 +38,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
|
||||
[ViewVariables]
|
||||
public bool Anchored =>
|
||||
!IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out IPhysBody? physics) ||
|
||||
!_entMan.TryGetComponent(Owner, out IPhysBody? physics) ||
|
||||
physics.BodyType == BodyType.Static;
|
||||
|
||||
[ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(DisposalRouterUiKey.Key);
|
||||
@@ -52,7 +54,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
return directions[1];
|
||||
}
|
||||
|
||||
return IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).LocalRotation.GetDir();
|
||||
return _entMan.GetComponent<TransformComponent>(Owner).LocalRotation.GetDir();
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
@@ -160,12 +162,12 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
/// <param name="args">Data relevant to the event such as the actor which triggered it.</param>
|
||||
void IActivate.Activate(ActivateEventArgs args)
|
||||
{
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(args.User, out ActorComponent? actor))
|
||||
if (!_entMan.TryGetComponent(args.User, out ActorComponent? actor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(args.User, out HandsComponent? hands))
|
||||
if (!_entMan.TryGetComponent(args.User, out HandsComponent? hands))
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("disposal-router-window-tag-input-activate-no-hands"));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user