diff --git a/Content.Client/ADT/AshWalker/UI/ADTNecropolisCompassBoundUserInterface.cs b/Content.Client/ADT/AshWalker/UI/ADTNecropolisCompassBoundUserInterface.cs new file mode 100644 index 00000000000..715bb632d6d --- /dev/null +++ b/Content.Client/ADT/AshWalker/UI/ADTNecropolisCompassBoundUserInterface.cs @@ -0,0 +1,41 @@ +using Content.Client.ADT.UI; +using Content.Shared.ADT.AshWalker; +using Robust.Client.UserInterface; + +namespace Content.Client.ADT.AshWalker.UI; + +public sealed class ADTNecropolisCompassBoundUserInterface : BoundUserInterface +{ + private ADTEntityPickerWindow? _window; + + public ADTNecropolisCompassBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + } + + protected override void Open() + { + base.Open(); + + _window = this.CreateWindow(); + _window.SetText( + Loc.GetString("adt-necropolis-compass-window-title"), + Loc.GetString("adt-necropolis-compass-window-hint")); + _window.OnEntrySelected += OnPointSelected; + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (_window == null || state is not ADTNecropolisCompassBuiState compassState) + return; + + _window.SetEntries(compassState.Points); + } + + private void OnPointSelected(NetEntity point) + { + SendMessage(new ADTNecropolisCompassSelectMessage(point)); + Close(); + } +} diff --git a/Content.Client/ADT/Rituals/ADTAshRuneMarkSystem.cs b/Content.Client/ADT/Rituals/ADTAshRuneMarkSystem.cs new file mode 100644 index 00000000000..76ea33a4e8e --- /dev/null +++ b/Content.Client/ADT/Rituals/ADTAshRuneMarkSystem.cs @@ -0,0 +1,35 @@ +using Content.Shared.ADT.Rituals; +using Robust.Client.GameObjects; + +namespace Content.Client.ADT.Rituals; + +public sealed class ADTAshRuneMarkSystem : EntitySystem +{ + [Dependency] private readonly SpriteSystem _sprite = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnStartup); + SubscribeLocalEvent(OnState); + } + + private void OnStartup(Entity ent, ref ComponentStartup args) + { + UpdateVisible(ent); + } + + private void OnState(Entity ent, ref AfterAutoHandleStateEvent args) + { + UpdateVisible(ent); + } + + private void UpdateVisible(Entity ent) + { + if (!TryComp(ent.Owner, out var sprite)) + return; + + _sprite.SetVisible((ent.Owner, sprite), ent.Comp.Lit); + } +} diff --git a/Content.Client/ADT/Rituals/UI/ADTRitualBoundUserInterface.cs b/Content.Client/ADT/Rituals/UI/ADTRitualBoundUserInterface.cs new file mode 100644 index 00000000000..168164f8cd8 --- /dev/null +++ b/Content.Client/ADT/Rituals/UI/ADTRitualBoundUserInterface.cs @@ -0,0 +1,31 @@ +using Content.Shared.ADT.Rituals; +using Robust.Client.UserInterface; + +namespace Content.Client.ADT.Rituals.UI; + +public sealed class ADTRitualBoundUserInterface : BoundUserInterface +{ + private ADTRitualMenuWindow? _window; + + public ADTRitualBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + } + + protected override void Open() + { + base.Open(); + + _window = this.CreateWindow(); + _window.OnStartPressed += ritual => SendMessage(new ADTRitualStartMessage(ritual)); + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (_window == null || state is not ADTRitualBuiState ritualState) + return; + + _window.SetState(ritualState); + } +} diff --git a/Content.Client/ADT/Rituals/UI/ADTRitualMenuWindow.xaml b/Content.Client/ADT/Rituals/UI/ADTRitualMenuWindow.xaml new file mode 100644 index 00000000000..6730163c274 --- /dev/null +++ b/Content.Client/ADT/Rituals/UI/ADTRitualMenuWindow.xaml @@ -0,0 +1,57 @@ + + + + + +