Files
Delta-v/Content.Client/_DV/CosmicCult/UI/Monument/MonumentBoundUserInterface.cs
T
dad088edcb The Cosmic Cult (#3288)
* asset upload

* fixes

* yml

* guidebook, alert

* yml fixes

* yml you silly goose

* yml and ft and just one tiny tiny cs

* wtf is git doing i swear i already comitted these exact files

* i can't believe it took 16 minutes to fail an enum

* test fails begone. please.

* ccvar namespace correction

* ftl changes, namespace fixes again

* wow actiongrant yml conflicts make me angrier than god

* razor weapon dev

* some requested changes

* more requested changes

* step one of who knows how many requested changes

* grabbag of bugfixes

* big refactorenning

* the refactorings continue

* bugfixes, some timering

* ability system feedbacks

* finish detimering

* she feed on my back til i loop

* ough

* linq...

* unity

* mrrrp

* meow

* todo

* mrp

* woe rider mass cleanup be upon ye

* ough

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert "woe rider mass cleanup be upon ye"

This reverts commit 5e24490a66389c78efe969d16e43a7c5d52c1249.

* 3 of 9

* omegadictionary begone

* centralize is cosmic cult/sees cosmic cult checks

* durations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* florbular

Co-authored-by: Tobias Berger <toby@tobot.dev>
Signed-off-by: pathetic meowmeow <uhhadd@gmail.com>

* feedback is stored in the git

* yaml warrior

* test fail real

* dont specify the default

---------

Signed-off-by: pathetic meowmeow <uhhadd@gmail.com>
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tobias Berger <toby@tobot.dev>
2025-05-02 10:58:51 -04:00

42 lines
1.2 KiB
C#

using Content.Shared._DV.CosmicCult;
using Content.Shared._DV.CosmicCult.Components;
using Content.Shared._DV.CosmicCult.Prototypes;
using JetBrains.Annotations;
using Robust.Client.UserInterface;
using Robust.Shared.Prototypes;
namespace Content.Client._DV.CosmicCult.UI.Monument;
[UsedImplicitly]
public sealed class MonumentBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
{
[ViewVariables]
private MonumentMenu? _menu;
protected override void Open()
{
base.Open();
_menu = this.CreateWindow<MonumentMenu>();
_menu.OnSelectGlyphButtonPressed += protoId => SendMessage(new GlyphSelectedMessage(protoId));
_menu.OnRemoveGlyphButtonPressed += () => SendMessage(new GlyphRemovedMessage());
_menu.OnGainButtonPressed += OnInfluenceSelected;
}
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
if (state is not MonumentBuiState buiState)
return;
_menu?.UpdateState(buiState);
}
private void OnInfluenceSelected(ProtoId<InfluencePrototype> selectedInfluence)
{
SendMessage(new InfluenceSelectedMessage(selectedInfluence));
}
}