Files
crystall-punk-14/Content.Client/_CP14/Trading/CP14TradingPlatformBoundUserInterface.cs
Red a3ae67a762 Trade reputation rework + Merchants back + Mining contract (#1347)
* refactor unlocking

* fix contract debug crashing

* Update dev_map.yml

* bugfixes and content rebalance

* ore buy contract
2025-06-01 15:10:36 +03:00

32 lines
843 B
C#

using Content.Shared._CP14.Trading;
using Content.Shared._CP14.Trading.Systems;
using Robust.Client.UserInterface;
namespace Content.Client._CP14.Trading;
public sealed class CP14TradingPlatformBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
{
private CP14TradingPlatformWindow? _window;
protected override void Open()
{
base.Open();
_window = this.CreateWindow<CP14TradingPlatformWindow>();
_window.OnBuy += pos => SendMessage(new CP14TradingPositionBuyAttempt(pos));
}
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
switch (state)
{
case CP14TradingPlatformUiState storeState:
_window?.UpdateState(storeState);
break;
}
}
}