Minor improvements to mining order console (#72239)

## About The Pull Request

Mining order consoles are now called 'order console' instead of 'vendor'

Cargo orders through the mining vendor can no longer be cancelled
("clear" on the ntos cargo app no longer removes department orders too)

Cargo orders made with mining points now state 'mp' (for 'mining
points') instead of 'cr' to the Cargo console.

The order consoles now have a '+' icon that will instantly add +1 item
to your cart, so you don't have to manually type 1 each time.

The order console's UI name is now named after the machine, rather than
being hardcoded to 'Produce Orders'

Also makes the UI resilient to breaking if the wearer doesn't have an ID
equipped.

## Why It's Good For The Game

Better player-feedback and makes a better distinction between mining
order console and normal vendors, as well as fixes some problems like
Cargo just deleting people's mining points by deleting their
unrefundable orders.

The + button was a suggestion in the comments here and thought it would
just be a nice harmless inclusion.

The departmental order cancelling on the NTos cargo app and UI not
breaking if you don't have an ID were just bonuses that I fixed while
dealing with everything else.

## Changelog

🆑
qol: Mining order consoles are now named 'order console'.
qol: Orders from said mining order consoles can now no longer be
cancelled, and are listed as 'mp' (mining points) in the Cargo console
instead of 'cr'.
qol: Order consoles now have a + button that will instantly add 1 of the
item.
fix: Departmental orders can no longer be cancelled through the NTos
cargo application.
fix: Wearing an ID will no longer break order consoles.
/🆑
This commit is contained in:
John Willard
2023-01-02 09:12:36 +00:00
committed by GitHub
parent 764768d5c7
commit 5367560fb5
7 changed files with 53 additions and 22 deletions
@@ -125,11 +125,14 @@
data["cart"] = list()
for(var/datum/supply_order/SO in SSshuttle.shopping_list)
data["cart"] += list(list(
"cost_type" = SO.cost_type,
"object" = SO.pack.name,
"cost" = SO.pack.get_cost(),
"id" = SO.id,
"orderer" = SO.orderer,
"paid" = !isnull(SO.paying_account) //paid by requester
"paid" = !isnull(SO.paying_account), //paid by requester
"dep_order" = !!SO.department_destination,
"can_be_cancelled" = SO.can_be_cancelled,
))
data["requests"] = list()
@@ -251,7 +254,10 @@
. = TRUE
break
if("clear")
SSshuttle.shopping_list.Cut()
for(var/datum/supply_order/cancelled_order in SSshuttle.shopping_list)
if(cancelled_order.department_destination || cancelled_order.can_be_cancelled)
continue //don't cancel other department's orders or orders that can't be cancelled
SSshuttle.shopping_list -= cancelled_order
. = TRUE
if("approve")
var/id = text2num(params["id"])