Codeside Cargo Refactor (#20030)

**NOTE TO SYSADMINS: See "SQL Details" section below for information on
SQL modifications.**

Moves the data containing cargo items (i.e. the ones you order from ops
and get in the cargo shuttle) from the online database to the codebase.
Everything from suppliers to categories to individual items is now
code-side and editable by developers/contributors.

Refactors cargo items to use `singletons` instead of `datums` for
`cargo_supplier`, `cargo_category`, and `cargo_item`. Multiple-instnace
things like cargo_orders, etc. still use `datums`.

Fixed a bunch of strange discrepancies in categories, suppliers, and
pricing for various cargo items. I did a little bit, but it's exhausting
to go through all of it right now.

Clicking the 'Details' button on the Cargo Order app now actually gives
you details instead of bluescreening. Also added some UI elements to the
Cargo Order app - Cargo Control and Delivery remain untouched.

Overhauled the Cargo Order console TGUI window. It now has tabs on the
left, displays restricted access, supplier information, and boasts
search functionality.

### SQL Details
<details>
<summary>SQL Details [Click to Expand]</summary>

The following SQL tables should be deleted or deprecated from the server
database, as they are no longer in use:

- `ss13_cargo_items`
- `ss13_cargo_categories`
- `ss13_cargo_suppliers`

The included migration file, `V011__codeside_cargo`, creates a new table
`ss13_cargo_item_orderlog` to the DB. This **replaces**
`ss13_cargo_orderlog_items`. Because of this,
`ss13_cargo_orderlog_items` is deprecated and should either be deleted
or locked & preserved for logging purposes.

</details>

## Screenshots


![image](https://github.com/user-attachments/assets/79129923-1fb6-4cee-ac8d-5505a52270a4)

![image](https://github.com/user-attachments/assets/a323be35-8ce6-4ec4-98f7-ee701d0931a3)

![image](https://github.com/user-attachments/assets/5ddb02c5-152f-4715-b2da-20903fa11c93)

![image](https://github.com/user-attachments/assets/420e45b0-6a9f-4420-beb8-a2c8423a5be4)

![image](https://github.com/user-attachments/assets/114f4755-ee51-41e6-8670-07aacc5326ae)

---------

Signed-off-by: naut <55491249+nauticall@users.noreply.github.com>
Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
This commit is contained in:
naut
2025-03-05 02:18:00 +08:00
committed by GitHub
parent 14d7425cee
commit 55f4e12614
32 changed files with 7869 additions and 583 deletions
@@ -82,7 +82,23 @@
guaranteed_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/adhomai)
scheduled_port_visits = list("Thursday", "Sunday")
ports_of_call = list("the city of Nal'tor", "the city of Kaltir", "the city of Crevus")
cargo_price_coef = list("nt" = 1.2, "hpi" = 1.2, "zhu" = 1.2, "een" = 1.2, "get" = 1.2, "arz" = 1.2, "blm" = 1.2, "iac" = 1.2, "zsc" = 0.5, "vfc" = 1.2, "bis" = 1.2, "xmg" = 1.2, "npi" = 1.2)
cargo_price_coef = list(
"nanotrasen" = 1.2,
"orion" = 1.1,
"hephaestus" = 1.2,
"zeng_hu" = 1.2,
"eckharts" = 1.2,
"getmore" = 1.2,
"arizi" = 1.2,
"blam" = 1.2,
"iac" = 1.2,
"zharkov" = 0.5,
"virgo" = 1.2,
"bishop" = 1.2,
"xion" = 1.2,
"zavodskoi" = 1.2,
)
starlight_color = "#50b7bb"
starlight_power = 2
starlight_range = 4
@@ -140,7 +156,22 @@
starlight_color = "#f8711e"
starlight_power = 2
starlight_range = 4
cargo_price_coef = list("nt" = 1.5, "hpi" = 0.5, "zhu" = 1.5, "een" = 1.5, "get" = 1.2, "arz" = 0.5, "blm" = 1.2, "iac" = 1.0, "zsc" = 0.9, "vfc" = 1.2, "bis" = 1.5, "xmg" = 0.6, "npi" = 1.5)
cargo_price_coef = list(
"nanotrasen" = 1.5,
"orion" = 0.8,
"hephaestus" = 0.5,
"zeng_hu" = 1.5,
"eckharts" = 1.5,
"getmore" = 1.2,
"arizi" = 0.5,
"blam" = 1.2,
"iac" = 1.0,
"zharkov" = 0.9,
"virgo" = 1.2,
"bishop" = 1.5,
"xion" = 0.6,
"zavodskoi" = 1.5,
)
sector_welcome_message = 'sound/AI/welcome_hegemony.ogg'
scheduled_port_visits = list("Thursday", "Sunday")
ports_of_call = list("the city of Skalamar")
@@ -16,7 +16,23 @@
description = "The region most devastated by the Interstellar War, the majority of the Weeping Stars has yet to recover from the damage it suffered during the War and much of it remains underdeveloped and sparsely inhabited. During the hegemonic era of the Solarian Alliance, when the Alliance stretched from Sol to the edge of known space, this region was known as the Inner Solarian Frontier and was intended to serve as a highly-developed region for humanity to thrive in. Massive amounts of funds were used to build an infrastructure which was still incomplete when war broke out in 2277, and the shattered ruins of long-lost Solarian hegemonic era structures and projects are present throughout the region."
skybox_icon = "weeping_stars"
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert, /obj/effect/overmap/visitable/sector/exoplanet/snow)
cargo_price_coef = list("nt" = 1.2, "hpi" = 0.8, "zhu" = 0.8, "een" = 1.2, "get" = 1.2, "arz" = 1.2, "blm" = 1.2, "iac" = 1.2, "zsc" = 0.8, "vfc" = 1.2, "bis" = 0.8, "xmg" = 0.8, "npi" = 0.8)
cargo_price_coef = list(
"nanotrasen" = 1.2,
"orion" = 0.8,
"hephaestus" = 0.8,
"zeng_hu" = 0.8,
"eckharts" = 1.2,
"getmore" = 1.2,
"arizi" = 1.2,
"blam" = 1.2,
"iac" = 1.2,
"zharkov" = 0.8,
"virgo" = 1.2,
"bishop" = 0.8,
"xion" = 0.8,
"zavodskoi" = 0.8,
)
starlight_color = "#615bff"
starlight_power = 2
starlight_range = 4
@@ -46,7 +62,23 @@
description = "The system of Burzsia serves as a resource hub solely for the corporate interests of Hephaestus Industries, with vast mining infrastructure and sprawling supply ports dotted all over the system. Hephaestus ships, enormous freighters and personnel transportation vessels dominate the area, with corporate security being extremely tight. Private vessels are allowed transit and rest if needed, though always under the close surveillance of Hephaestus security and local executives. A population of local off-worlders has also been present before corporate domination, but mostly leave any external relations to the company that has, at this point, taken upon it to represent virtually all interests of the natives."
skybox_icon = "weeping_stars"
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/burzsia, /obj/effect/overmap/visitable/sector/exoplanet/burzsia)
cargo_price_coef = list("nt" = 1.2, "hpi" = 0.4, "zhu" = 0.8, "een" = 1.2, "get" = 1.2, "arz" = 1.2, "blm" = 1.2, "iac" = 1.2, "zsc" = 0.8, "vfc" = 1.2, "bis" = 0.8, "xmg" = 0.8, "npi" = 0.8)
cargo_price_coef = list(
"nanotrasen" = 1.2,
"orion" = 1,
"hephaestus" = 0.4,
"zeng_hu" = 0.8,
"eckharts" = 1.2,
"getmore" = 1.2,
"arizi" = 1.2,
"blam" = 1.2,
"iac" = 1.2,
"zharkov" = 1.2,
"virgo" = 1.2,
"bishop" = 0.8,
"xion" = 0.8,
"zavodskoi" = 0.8,
)
starlight_color = "#615bff"
starlight_power = 2
starlight_range = 4
@@ -59,7 +91,19 @@
skybox_icon = "haneunim"
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/qixi, /obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/ice/haneunim, /obj/effect/overmap/visitable/sector/exoplanet/barren/hwanung, /obj/effect/overmap/visitable/sector/exoplanet/lava/huozhu)
guaranteed_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/konyang)
cargo_price_coef = list("nt" = 1.1, "hpi" = 0.7, "zhu" = 0.4, "een" = 1.0, "get" = 1.1, "arz" = 1.8, "blm" = 0.9, "iac" = 1.2, "zsc" = 1.8, "vfc" = 0.9, "bis" = 0.4, "xmg" = 0.7, "npi" = 0.8)
cargo_price_coef = list(
"nanotrasen" = 1.1,
"orion" = 0.7,
"hephaestus" = 0.7,
"zeng_hu" = 0.6,
"eckharts" = 1,
"blam" = 0.9,
"zharkov" = 1.2,
"virgo" = 0.9,
"bishop" = 0.5,
"xion" = 0.8,
"zavodskoi" = 0.8,
)
ports_of_call = list("the corporate district of Aoyama")
scheduled_port_visits = list("Saturday", "Sunday")
@@ -12,8 +12,23 @@
var/list/possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/snow, /obj/effect/overmap/visitable/sector/exoplanet/desert)
///Guaranteed planets to spawn. This ignores the map exoplanet limit, so don't put too many planets in here.
var/list/guaranteed_exoplanets = list()
var/list/cargo_price_coef = list("nt" = 1, "hpi" = 1, "zhu" = 1, "een" = 1, "get" = 1, "arz" = 1, "blm" = 1,
"iac" = 1, "zsc" = 1, "vfc" = 1, "bis" = 1, "xmg" = 1, "npi" = 1) //how much the space sector afffects how expensive is ordering from that cargo supplier
var/list/cargo_price_coef = list( //how much the space sector afffects how expensive is ordering from that cargo supplier
"nanotrasen" = 1,
"orion" = 1,
"hephaestus" = 1,
"zeng_hu" = 1,
"eckharts" = 1,
"getmore" = 1,
"arizi" = 1,
"blam" = 1,
"iac" = 1,
"zharkov" = 1,
"virgo" = 1,
"bishop" = 1,
"xion" = 1,
"zavodskoi" = 1,
)
var/skybox_icon = "ceti"
/// An associated list of lore radio stations formatted like so: list("station name" = "path_to_broadcast.txt")
@@ -3,8 +3,14 @@
description = "Tau Ceti is a system located in close proximity of Sol, and serves as the main base of operation for the megacorporation NanoTrasen. Tau Ceti is governed by the \
Republic of Biesel, a young Republic that became independent of the economically troubled Sol Alliance in 2452 due to heavy pressure by NanoTrasen. There is still resentment in \
the Sol Alliance over the loss of such a wealthy system, while NanoTrasen continues to have a heavy hand in all levels of Tau Ceti."
cargo_price_coef = list("nt" = 0.8, "hpi" = 0.8, "zhu" = 0.8, "een" = 1, "get" = 0.8, "arz" = 1, "blm" = 1,
"iac" = 1, "zsc" = 1, "vfc" = 1, "bis" = 0,8, "xmg" = 0.8, "npi" = 0.8)
cargo_price_coef = list(
"nanotrasen" = 0.8,
"orion" = 1,
"getmore" = 0.7,
"arizi" = 1.2,
"vysoka" = 1.2,
)
guaranteed_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/biesel)
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/lava/caprice, /obj/effect/overmap/visitable/sector/exoplanet/desert/luthien, /obj/effect/overmap/visitable/sector/exoplanet/barren/valkyrie,
/obj/effect/overmap/visitable/sector/exoplanet/snow/new_gibson, /obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/ice/chandras, /obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/dumas)