mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
14 lines
454 B
C#
14 lines
454 B
C#
using Robust.Server.GameObjects;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.IoC;
|
|
|
|
namespace Content.Server.UserInterface
|
|
{
|
|
public static class UserInterfaceHelpers
|
|
{
|
|
public static BoundUserInterface? GetUIOrNull(this IEntity entity, object uiKey)
|
|
{
|
|
return IoCManager.Resolve<IEntityManager>().GetComponentOrNull<ServerUserInterfaceComponent>(entity)?.GetBoundUserInterfaceOrNull(uiKey);
|
|
}
|
|
}
|
|
}
|