From 8e1145b1fca8bfb6e3b858b54d3146d8de74cc66 Mon Sep 17 00:00:00 2001 From: c4llv07e Date: Thu, 22 Jan 2026 19:37:45 +0300 Subject: [PATCH] Cargo console rework (retry) (#34052) * Cargo console upgraded * add comment of hardcode * Update Resources/Locale/en-US/cargo/cargo-console-component.ftl Co-authored-by: Thomas <87614336+Aeshus@users.noreply.github.com> * Update Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs Co-authored-by: Thomas <87614336+Aeshus@users.noreply.github.com> * Update Content.Client/Cargo/UI/CargoConsoleOrderMenu.xaml Co-authored-by: Thomas <87614336+Aeshus@users.noreply.github.com> * Some small technical improvements * More indent * Fix unknown requester name * whitespace cleanup * Small improvement * Add order price to the title * Fix build errors * Port new slip system * Remove unused loc * Some required changes * Add stride * minor code style + update to sheetlets --------- Co-authored-by: VideoKompany <135313844+VlaDOS1408@users.noreply.github.com> Co-authored-by: Thomas <87614336+Aeshus@users.noreply.github.com> Co-authored-by: Janet Blackquill --- .../CargoOrderConsoleBoundUserInterface.cs | 16 +- Content.Client/Cargo/UI/CargoConsoleMenu.xaml | 304 +++++++++++++----- .../Cargo/UI/CargoConsoleMenu.xaml.cs | 54 +++- .../Cargo/UI/CargoConsoleOrderMenu.xaml | 48 ++- Content.Client/Cargo/UI/CargoOrderRow.xaml | 108 +++++-- Content.Client/Cargo/UI/CargoProductRow.xaml | 58 ++-- .../Cargo/UI/CargoProductRow.xaml.cs | 2 +- .../en-US/cargo/cargo-console-component.ftl | 14 +- 8 files changed, 427 insertions(+), 177 deletions(-) diff --git a/Content.Client/Cargo/BUI/CargoOrderConsoleBoundUserInterface.cs b/Content.Client/Cargo/BUI/CargoOrderConsoleBoundUserInterface.cs index 3bd220bfad..9cd614de14 100644 --- a/Content.Client/Cargo/BUI/CargoOrderConsoleBoundUserInterface.cs +++ b/Content.Client/Cargo/BUI/CargoOrderConsoleBoundUserInterface.cs @@ -70,9 +70,9 @@ namespace Content.Client.Cargo.BUI _menu.OnClose += Close; - _menu.OnItemSelected += (args) => + _menu.OnItemSelected += (row) => { - if (args.Button.Parent is not CargoProductRow row) + if (row == null) return; description.Clear(); @@ -175,23 +175,23 @@ namespace Content.Client.Cargo.BUI return true; } - private void RemoveOrder(ButtonEventArgs args) + private void RemoveOrder(CargoOrderData? order) { - if (args.Button.Parent?.Parent is not CargoOrderRow row || row.Order == null) + if (order == null) return; - SendMessage(new CargoConsoleRemoveOrderMessage(row.Order.OrderId)); + SendMessage(new CargoConsoleRemoveOrderMessage(order.OrderId)); } - private void ApproveOrder(ButtonEventArgs args) + private void ApproveOrder(CargoOrderData? order) { - if (args.Button.Parent?.Parent is not CargoOrderRow row || row.Order == null) + if (order == null) return; if (OrderCount >= OrderCapacity) return; - SendMessage(new CargoConsoleApproveOrderMessage(row.Order.OrderId)); + SendMessage(new CargoConsoleApproveOrderMessage(order.OrderId)); } } } diff --git a/Content.Client/Cargo/UI/CargoConsoleMenu.xaml b/Content.Client/Cargo/UI/CargoConsoleMenu.xaml index 940352dc48..3ecfad94aa 100644 --- a/Content.Client/Cargo/UI/CargoConsoleMenu.xaml +++ b/Content.Client/Cargo/UI/CargoConsoleMenu.xaml @@ -1,86 +1,226 @@ - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -