Inline GetComponentOrNull
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server.UserInterface
|
||||
{
|
||||
@@ -7,7 +8,7 @@ namespace Content.Server.UserInterface
|
||||
{
|
||||
public static BoundUserInterface? GetUIOrNull(this IEntity entity, object uiKey)
|
||||
{
|
||||
return entity.GetComponentOrNull<ServerUserInterfaceComponent>()?.GetBoundUserInterfaceOrNull(uiKey);
|
||||
return IoCManager.Resolve<IEntityManager>().GetComponentOrNull<ServerUserInterfaceComponent>(entity.Uid)?.GetBoundUserInterfaceOrNull(uiKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user