mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
25 lines
760 B
C#
25 lines
760 B
C#
using Content.Shared.RadialSelector;
|
|
using Content.Shared.ShortConstruction;
|
|
using Content.Shared.UserInterface;
|
|
using Robust.Server.GameObjects;
|
|
|
|
namespace Content.Server.ShortConstruction;
|
|
|
|
public sealed class ShortConstructionSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<ShortConstructionComponent, BeforeActivatableUIOpenEvent>(BeforeUiOpen);
|
|
}
|
|
|
|
private void BeforeUiOpen(Entity<ShortConstructionComponent> ent, ref BeforeActivatableUIOpenEvent args)
|
|
{
|
|
var state = new RadialSelectorState(ent.Comp.Entries);
|
|
_ui.SetUiState(ent.Owner, RadialSelectorUiKey.Key, state);
|
|
}
|
|
}
|