mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* simple fix for "Approved by: Self" on all cargo invoices * port of ruddygreat's bounty console improvements to DeltaV * modified tooltips and fixed a few importing errors * StatusLabel in BountyEntry.xaml.cs * final stupid tweak * removed unrelated bugfix PR that snuck into this branch somehow * Cargo bounty fix requests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: cargomouse <dboozlebeep@gmail.com> Co-authored-by: Jessica Harvey <itsjessagain23@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
58 lines
1.5 KiB
C#
58 lines
1.5 KiB
C#
using Content.Client.Cargo.UI;
|
|
using Content.Shared.Cargo.Components;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.UserInterface;
|
|
using Content.Shared._DV.Cargo.Components; // DeltaV: Bounty claim messages
|
|
|
|
namespace Content.Client.Cargo.BUI;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class CargoBountyConsoleBoundUserInterface : BoundUserInterface
|
|
{
|
|
[ViewVariables]
|
|
private CargoBountyMenu? _menu;
|
|
|
|
public CargoBountyConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_menu = this.CreateWindow<CargoBountyMenu>();
|
|
|
|
_menu.OnLabelButtonPressed += id =>
|
|
{
|
|
SendMessage(new BountyPrintLabelMessage(id));
|
|
};
|
|
|
|
_menu.OnSkipButtonPressed += id =>
|
|
{
|
|
SendMessage(new BountySkipMessage(id));
|
|
};
|
|
|
|
// DeltaV: bounty claim stuff begins
|
|
_menu.OnClaimButtonPressed += id =>
|
|
{
|
|
SendMessage(new BountyClaimedMessage(id));
|
|
};
|
|
|
|
_menu.OnStatusOptionSelected += (id, status) =>
|
|
{
|
|
SendMessage(new BountySetStatusMessage(id, status));
|
|
};
|
|
// DeltaV: bounty claim stuff ends
|
|
}
|
|
|
|
protected override void UpdateState(BoundUserInterfaceState message)
|
|
{
|
|
base.UpdateState(message);
|
|
|
|
if (message is not CargoBountyConsoleState state)
|
|
return;
|
|
|
|
_menu?.UpdateEntries(state.Bounties, state.History, state.UntilNextSkip);
|
|
}
|
|
}
|