From f02d02cb3102c5ccdc0b53353b005ad58ca91a61 Mon Sep 17 00:00:00 2001 From: Casper3667 <8396443+Casper3667@users.noreply.github.com> Date: Mon, 10 Nov 2025 08:38:36 +0100 Subject: [PATCH] Fixes removing the last item on an order on the cash register and quikpay. (#21558) A small oversight from my cash register PR, this fixes that. --- code/modules/cooking/machinery/commissary.dm | 2 +- code/modules/economy/quikpay.dm | 4 +++- html/changelogs/RegisterFix.yml | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/RegisterFix.yml diff --git a/code/modules/cooking/machinery/commissary.dm b/code/modules/cooking/machinery/commissary.dm index 3eb5003466a..62c9cf7fd27 100644 --- a/code/modules/cooking/machinery/commissary.dm +++ b/code/modules/cooking/machinery/commissary.dm @@ -294,7 +294,7 @@ if(L["amount"] > 1) L["amount"]-- else - items.Cut(index, index+1) + buying.Cut(index, index+1) . = TRUE if("confirm") diff --git a/code/modules/economy/quikpay.dm b/code/modules/economy/quikpay.dm index bef6aba4acc..3407ce5e13d 100644 --- a/code/modules/economy/quikpay.dm +++ b/code/modules/economy/quikpay.dm @@ -179,12 +179,14 @@ buying += list(list("name" = params["buying"], "amount" = params["amount"])) if("removal") + var/index = 0 for(var/list/L in buying) + index++ if(L["name"] == params["removal"]) if(L["amount"] > 1) L["amount"]-- else - buying -= L + buying.Cut(index, index+1) . = TRUE if("confirm") diff --git a/html/changelogs/RegisterFix.yml b/html/changelogs/RegisterFix.yml new file mode 100644 index 00000000000..8d8ec89dfdd --- /dev/null +++ b/html/changelogs/RegisterFix.yml @@ -0,0 +1,6 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - bugfix: "Fixed the quikpay and cash register's ability to remove items from the buying list."