Inline TryGetComponent completely, for real
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Shared.Construction;
|
||||
using Content.Shared.Examine;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -37,7 +38,7 @@ namespace Content.Server.Construction.Conditions
|
||||
{
|
||||
var entity = args.Examined;
|
||||
|
||||
if (!entity.TryGetComponent<MachineFrameComponent>(out var machineFrame))
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<MachineFrameComponent?>(entity.Uid, out var machineFrame))
|
||||
return false;
|
||||
|
||||
if (!machineFrame.HasBoard)
|
||||
|
||||
Reference in New Issue
Block a user