* Make funding allocation computer more configurable * admin logging * unused * ccvar enabled --------- Co-authored-by: ScarKy0 <scarky0@onet.eu>
36 lines
920 B
C#
36 lines
920 B
C#
using Content.Client.Cargo.UI;
|
|
using Content.Shared.Cargo.Components;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client.Cargo.BUI;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class FundingAllocationConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
|
|
{
|
|
[ViewVariables]
|
|
private FundingAllocationMenu? _menu;
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_menu = this.CreateWindow<FundingAllocationMenu>();
|
|
|
|
_menu.OnSavePressed += (dicts, primary, lockbox) =>
|
|
{
|
|
SendMessage(new SetFundingAllocationBuiMessage(dicts, primary, lockbox));
|
|
};
|
|
}
|
|
|
|
protected override void UpdateState(BoundUserInterfaceState message)
|
|
{
|
|
base.UpdateState(message);
|
|
|
|
if (message is not FundingAllocationConsoleBuiState state)
|
|
return;
|
|
|
|
_menu?.Update(state);
|
|
}
|
|
}
|