2021-07-17 02:37:09 +02:00
|
|
|
|
using Robust.Server.GameObjects;
|
2021-02-11 01:13:03 -08:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2021-12-03 15:32:05 +01:00
|
|
|
|
using Robust.Shared.IoC;
|
2020-08-24 20:47:17 +02:00
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Server.UserInterface
|
2020-08-24 20:47:17 +02:00
|
|
|
|
{
|
|
|
|
|
|
public static class UserInterfaceHelpers
|
|
|
|
|
|
{
|
2021-12-04 14:14:22 +01:00
|
|
|
|
public static BoundUserInterface? GetUIOrNull(this EntityUid entity, object uiKey)
|
2020-08-24 20:47:17 +02:00
|
|
|
|
{
|
2021-12-03 15:53:09 +01:00
|
|
|
|
return IoCManager.Resolve<IEntityManager>().GetComponentOrNull<ServerUserInterfaceComponent>(entity)?.GetBoundUserInterfaceOrNull(uiKey);
|
2020-08-24 20:47:17 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|