Inline TryGetComponent completely, for real
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Shared.Doors;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.Doors.Systems
|
||||
@@ -87,7 +88,7 @@ namespace Content.Server.Doors.Systems
|
||||
private void OnDoorClickShouldActivate(EntityUid uid, AirlockComponent component, DoorClickShouldActivateEvent args)
|
||||
{
|
||||
if (component.WiresComponent != null && component.WiresComponent.IsPanelOpen &&
|
||||
args.Args.User.TryGetComponent(out ActorComponent? actor))
|
||||
IoCManager.Resolve<IEntityManager>().TryGetComponent(args.Args.User.Uid, out ActorComponent? actor))
|
||||
{
|
||||
component.WiresComponent.OpenInterface(actor.PlayerSession);
|
||||
args.Handled = true;
|
||||
|
||||
Reference in New Issue
Block a user