Supply Consoles restyle & order content preview (#89198)

## About The Pull Request
In a nutshell, everything will be visible in the `Demo` section.
But if you want some details...

- Filling of static_data was divided into procs, for better
understanding and possibility to use the same actions in two order
consoles
- Added an image of the first item in crate at each order (almost)
- Added the ability to see what is inside an order, the information is
not always accurate due to the nature of some orders such as random hats
- Slightly remaked layout, making everything look more cohesive and
eliminating the empty space at the bottom of the screen
- When buying anonymously, the original price does not disappear, but is
crossed out, and the new price is written below it

## Demo
<details><summary> Screenshots </summary>

Supply Console
| Before | After |
| - | - |
|
![image](https://github.com/user-attachments/assets/6067fc76-de5a-4d32-929a-239074514767)
|
![image](https://github.com/user-attachments/assets/81b3ab2a-f6d6-4f7a-8fff-0d5f459bcef9)
|

Express Console
| Before | After |
| - | - |
|
![image](https://github.com/user-attachments/assets/934554e5-ec42-422f-b6ce-f66a137bd280)
|
![image](https://github.com/user-attachments/assets/0d00c364-eece-4aa4-8f7d-f40ab7b9bb27)
|

Other 
| Content preview | Express login | 
| - | - |
|
![image](https://github.com/user-attachments/assets/62b3374e-5f46-4113-9da9-f481aa25739c)
|
![image](https://github.com/user-attachments/assets/8468f191-a5da-4de4-86f1-e0aca10256b3)
|

</details>

<details><summary> Video </summary>


https://github.com/user-attachments/assets/c7e16206-39f5-413c-9eea-c0284350c4a3

</details>

## Why It's Good For The Game
More convenience plus a bit prettier.
The ability to view the contents of an order, even if some madman didn't
describe its contents in the description (those who did this are really
crazy)
Section with tabs scrolls on both 515 and 516
And little cleaner data receiving code

## Changelog

🆑
qol: Supply console got little redesign, and ability to see what can be
inside a order.
code: Supply console and express supply console, now use a unified
method of acquiring data
/🆑

---------

Co-authored-by: Ivory <distributivgesetz93@gmail.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
This commit is contained in:
Aylong
2025-01-30 08:00:12 -08:00
committed by GitHub
co-authored by Ivory Jeremiah
parent d5bc76c273
commit d773f4db2f
9 changed files with 494 additions and 314 deletions
+12 -21
View File
@@ -92,26 +92,17 @@
/obj/machinery/computer/cargo/express/proc/packin_up(forced = FALSE) // oh shit, I'm sorry
meme_pack_data = list() // sorry for what?
if (!forced && !SSshuttle.initialized) // Subsystem is still sleeping, add ourselves to its buffer and abort
SSshuttle.express_consoles += src
return
for(var/pack in SSshuttle.supply_packs) // our quartermaster taught us not to be ashamed of our supply packs
var/datum/supply_pack/P = SSshuttle.supply_packs[pack] // specially since they're such a good price and all
if(!meme_pack_data[P.group]) // yeah, I see that, your quartermaster gave you good advice
meme_pack_data[P.group] = list( // it gets cheaper when I return it
"name" = P.group, // mmhm
"packs" = list() // sometimes, I return it so much, I rip the manifest
) // see, my quartermaster taught me a few things too
if((P.hidden) || (P.special)) // like, how not to rip the manifest
continue// by using someone else's crate
if(P.contraband && !contraband) // will you show me?
continue // i'd be right happy to
meme_pack_data[P.group]["packs"] += list(list(
"name" = P.name,
"cost" = P.get_cost() * get_discount(),
"id" = pack,
"desc" = P.desc || P.name // If there is a description, use it. Otherwise use the pack's name.
))
if(!forced && !SSshuttle.initialized) // our quartermaster taught us not to be ashamed of our supply packs
SSshuttle.express_consoles += src // specially since they're such a good price and all
return // yeah, I see that, your quartermaster gave you good advice
// it gets cheaper when I return it
for(var/pack_id in SSshuttle.supply_packs) // mmhm
var/datum/supply_pack/pack = SSshuttle.supply_packs[pack_id] // sometimes, I return it so much, I rip the manifest
if(!meme_pack_data[pack.group]) // see, my quartermaster taught me a few things too
meme_pack_data[pack.group] = list( // like, how not to rip the manifest
"name" = pack.group, // by using someone else's crate
"packs" = get_packs_data(pack.group, express = TRUE), // will you show me?
) // i'd be right happy to
/obj/machinery/computer/cargo/express/ui_data(mob/user)
var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location?
@@ -146,7 +137,7 @@
data["supplies"] = meme_pack_data
return data
/obj/machinery/computer/cargo/express/proc/get_discount()
/obj/machinery/computer/cargo/express/get_discount()
return (obj_flags & EMAGGED) ? EXPRESS_EMAG_DISCOUNT : 1
/obj/machinery/computer/cargo/express/ui_act(action, params, datum/tgui/ui)