From b19a33e6015a9f452405c5d13b3953a5c0bcdf7a Mon Sep 17 00:00:00 2001
From: Casper3667 <8396443+Casper3667@users.noreply.github.com>
Date: Sun, 8 Feb 2026 21:21:08 +0100
Subject: [PATCH] Updates the commissary and quikpay receipts (#21812)
Also fixes the quikpay working incorrectly after my last PR.
---
code/modules/cooking/machinery/commissary.dm | 12 ++++++++++--
code/modules/economy/quikpay.dm | 16 ++++++++++++++--
html/changelogs/RegisterReceipt.yml | 7 +++++++
maps/sccv_horizon/sccv_horizon.dmm | 3 ++-
4 files changed, 33 insertions(+), 5 deletions(-)
create mode 100644 html/changelogs/RegisterReceipt.yml
diff --git a/code/modules/cooking/machinery/commissary.dm b/code/modules/cooking/machinery/commissary.dm
index b7b719b360f..55f535f447a 100644
--- a/code/modules/cooking/machinery/commissary.dm
+++ b/code/modules/cooking/machinery/commissary.dm
@@ -145,6 +145,7 @@
var/receipt = ""
var/destinationact = "Operations"
var/credit = 100
+ var/shop_name = "Commissary"
storage_type = null
/obj/structure/cash_register/commissary/mechanics_hints(mob/user, distance, is_adjacent)
@@ -363,14 +364,21 @@
. = TRUE
if("confirm")
+ // Ensuring it is clear, in case the button is clicked multiple times
+ receipt = ""
+ sum = 0
+ var/obj/item/card/id/id_card = usr.GetIdCard()
+ var/cashier = id_card? id_card.registered_name : "Unknown"
+ receipt = "
[shop_name] receipt
Today's date: [worlddate2text()]
Cashier: [cashier]
Purchased items:"
for(var/list/bought_item in buying)
var/item_name = bought_item["name"]
var/item_amount = bought_item["amount"]
var/item_price = items_to_price[item_name]
- receipt += "[item_name]: x[item_amount] at [item_price]cr each
"
+ receipt += "- [item_name]: [item_amount] x [item_price]cr: [item_amount * item_price]cr
"
sum += item_price * item_amount
- receipt += "Total: [sum]cr
"
+
+ receipt += "
Total: [sum]cr
"
playsound(src, 'sound/machines/ping.ogg', 25, 1)
audible_message(SPAN_NOTICE("[icon2html(src, viewers(get_turf(src)))] \The [src] pings."))
. = TRUE
diff --git a/code/modules/economy/quikpay.dm b/code/modules/economy/quikpay.dm
index c8451d39227..f7ffe3d7ae2 100644
--- a/code/modules/economy/quikpay.dm
+++ b/code/modules/economy/quikpay.dm
@@ -18,6 +18,7 @@
var/editmode = FALSE
var/receipt = ""
var/destinationact = "Service"
+ var/shop_name = "Quikpay"
/obj/item/quikpay/Initialize()
. = ..()
@@ -69,6 +70,7 @@
R.stamped += /obj/item/stamp
R.AddOverlays(stampoverlay)
R.stamps += "
This paper has been stamped by the Quik-Pay device."
+ usr.put_in_any_hand_if_possible(R)
/obj/item/quikpay/attackby(obj/item/attacking_item, mob/user)
if (istype(attacking_item, /obj/item/spacecash/ewallet))
@@ -190,13 +192,23 @@
. = TRUE
if("confirm")
+ // Ensuring it is clear, in case the button is clicked multiple times
+ receipt = ""
+ sum = 0
+ var/obj/item/card/id/id_card = usr.GetIdCard()
+ var/cashier = id_card? id_card.registered_name : "Unknown"
+ receipt = "[shop_name] receipt
Today's date: [worlddate2text()]
Cashier: [cashier]
Purchased items:"
for(var/list/bought_item in buying)
var/item_name = bought_item["name"]
var/item_amount = bought_item["amount"]
var/item_price = items_to_price[item_name]
- receipt += "[name]: [item_name] x[item_amount] at [item_price]cr each
"
- sum += item_price
+ receipt += "- [item_name]: [item_amount] x [item_price]cr: [item_amount * item_price]cr
"
+ sum += item_price * item_amount
+
+ receipt += "
Total: [sum]cr
"
+ playsound(src, 'sound/machines/ping.ogg', 25, 1)
+ audible_message(SPAN_NOTICE("[icon2html(src, viewers(get_turf(src)))] \The [src] pings."))
. = TRUE
if("locking")
diff --git a/html/changelogs/RegisterReceipt.yml b/html/changelogs/RegisterReceipt.yml
new file mode 100644
index 00000000000..ebe7049e487
--- /dev/null
+++ b/html/changelogs/RegisterReceipt.yml
@@ -0,0 +1,7 @@
+author: TheGreyWolf
+
+delete-after: True
+
+changes:
+ - rscadd: "Updated the receipt from the commissary register and the quikpay."
+ - bugfix: "Fixed the quikpay not working as intended for multi-item payments."
diff --git a/maps/sccv_horizon/sccv_horizon.dmm b/maps/sccv_horizon/sccv_horizon.dmm
index a34ab603166..9bcd0d74f0b 100644
--- a/maps/sccv_horizon/sccv_horizon.dmm
+++ b/maps/sccv_horizon/sccv_horizon.dmm
@@ -140740,7 +140740,8 @@
/obj/structure/table/reinforced/steel,
/obj/item/quikpay{
destinationact = "Operations";
- pixel_y = 3
+ pixel_y = 3;
+ shop_name = "Commissary Quikpay"
},
/obj/machinery/power/outlet,
/obj/machinery/door/blast/shutters{