mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 02:41:18 +03:00
14 lines
456 B
C#
14 lines
456 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 EntityUid entity, object uiKey)
|
|
{
|
|
return IoCManager.Resolve<IEntityManager>().GetComponentOrNull<ServerUserInterfaceComponent>(entity)?.GetBoundUserInterfaceOrNull(uiKey);
|
|
}
|
|
}
|
|
}
|