Files
OldThink/Content.Server/UserInterface/UserInterfaceHelpers.cs

14 lines
393 B
C#
Raw Normal View History

using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
2021-06-09 22:19:39 +02:00
namespace Content.Server.UserInterface
{
public static class UserInterfaceHelpers
{
public static BoundUserInterface? GetUIOrNull(this IEntity entity, object uiKey)
{
return entity.GetComponentOrNull<ServerUserInterfaceComponent>()?.GetBoundUserInterfaceOrNull(uiKey);
}
}
}