mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 08:37:26 +00:00
15 lines
440 B
C#
15 lines
440 B
C#
#nullable enable
|
|
using Robust.Server.GameObjects.Components.UserInterface;
|
|
using Robust.Shared.Interfaces.GameObjects;
|
|
|
|
namespace Content.Server.Utility
|
|
{
|
|
public static class UserInterfaceHelpers
|
|
{
|
|
public static BoundUserInterface? GetUIOrNull(this IEntity entity, object uiKey)
|
|
{
|
|
return entity.GetComponentOrNull<ServerUserInterfaceComponent>()?.GetBoundUserInterfaceOrNull(uiKey);
|
|
}
|
|
}
|
|
}
|