Files
tbd-station-14/Content.Server/UserInterface/UserInterfaceHelpers.cs
2021-06-09 22:19:39 +02:00

15 lines
410 B
C#

#nullable enable
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Server.UserInterface
{
public static class UserInterfaceHelpers
{
public static BoundUserInterface? GetUIOrNull(this IEntity entity, object uiKey)
{
return entity.GetComponentOrNull<ServerUserInterfaceComponent>()?.GetBoundUserInterfaceOrNull(uiKey);
}
}
}