diff --git a/code/modules/modular_computers/computers/modular_computer/ui.dm b/code/modules/modular_computers/computers/modular_computer/ui.dm
index 51af5ce2a2d..f3255fca773 100644
--- a/code/modules/modular_computers/computers/modular_computer/ui.dm
+++ b/code/modules/modular_computers/computers/modular_computer/ui.dm
@@ -41,7 +41,7 @@
data["PC_showbatteryicon"] = !!battery_module
data["PC_batterypercent"] = battery_module ? "[round(battery_module.battery.percent())] %" : null
data["PC_apclinkicon"] = (tesla_link?.enabled && apc_powered) ? "charging.gif" : ""
- data["PC_device_theme"] = active_program ? active_program.tgui_theme : "scc"
+ data["PC_device_theme"] = active_program ? active_program.tgui_theme : device_theme
data["PC_ntneticon"] = get_ntnet_status_icon()
data["PC_stationtime"] = worldtime2text()
data["PC_stationdate"] = "[time2text(world.realtime, "DDD, Month DD")], [GLOB.game_year]"
diff --git a/code/modules/modular_computers/computers/modular_computer/variables.dm b/code/modules/modular_computers/computers/modular_computer/variables.dm
index 63a29dafca2..b3fa7b73265 100644
--- a/code/modules/modular_computers/computers/modular_computer/variables.dm
+++ b/code/modules/modular_computers/computers/modular_computer/variables.dm
@@ -79,6 +79,10 @@
var/screensaver_light_range = 0
var/screensaver_light_color
var/menu_light_color
+
+ /// Default theme if the program doesn't set it
+ var/device_theme = "scc"
+
/// Adds onto the output_message proc's range
var/message_output_range = 0
/// Maximal hardware size. Currently, tablets have 1, laptops 2 and consoles 3. Limits what hardware types can be installed.
diff --git a/code/modules/modular_computers/computers/subtypes/preset_handheld.dm b/code/modules/modular_computers/computers/subtypes/preset_handheld.dm
index 6087059b8f9..18a9411b52f 100644
--- a/code/modules/modular_computers/computers/subtypes/preset_handheld.dm
+++ b/code/modules/modular_computers/computers/subtypes/preset_handheld.dm
@@ -83,6 +83,11 @@
// Cargo Delivery
/obj/item/modular_computer/handheld/preset/supply/cargo_delivery
_app_preset_type = /datum/modular_computer_app_presets/cargo_delivery
+ device_theme = "orion"
+
+/obj/item/modular_computer/handheld/preset/supply/cargo_delivery/install_default_hardware()
+ . = ..()
+ nano_printer = new /obj/item/computer_hardware/nano_printer(src)
// Medical
diff --git a/code/modules/modular_computers/file_system/programs/civilian/cargo_control.dm b/code/modules/modular_computers/file_system/programs/civilian/cargo_control.dm
index 183542538e3..fe1602ac123 100644
--- a/code/modules/modular_computers/file_system/programs/civilian/cargo_control.dm
+++ b/code/modules/modular_computers/file_system/programs/civilian/cargo_control.dm
@@ -12,10 +12,14 @@
usage_flags = PROGRAM_LAPTOP | PROGRAM_CONSOLE | PROGRAM_TELESCREEN
tgui_id = "CargoControl"
- var/page = "overview_main" //overview_main - Main Menu, overview_submitted - Submitted Order Overview, overview_approved - Approved Order Overview, settings - Settings, details - order details, bounties - centcom bounties
- var/status_message //A status message that can be displayed
- var/list/order_details = list() //Order Details for the order
- var/list/shipment_details = list() //Shipment Details for a selected shipment
+ //overview_main - Main Menu, overview_submitted - Submitted Order Overview, overview_approved - Approved Order Overview, settings - Settings, details - order details, bounties - centcom bounties
+ var/page = "overview_main"
+ //A status message that can be displayed
+ var/status_message = "Awaiting input"
+ //Order Details for the order
+ var/list/order_details = null
+ //Shipment Details for a selected shipment
+ var/list/shipment_details = list()
/datum/computer_file/program/civilian/cargocontrol/ui_data(mob/user)
var/list/data = initial_data()
@@ -33,7 +37,7 @@
data["order_submitted_number"] = submitted_orders.len
data["order_submitted_value"] = SScargo.get_orders_value_by_status("submitted",1)
data["order_submitted_suppliers"] = SScargo.get_order_suppliers_by_status("submitted",1)
- data["order_submitted_shuttle_time"] = SScargo.get_pending_shipment_time("submitted")
+ data["order_submitted_shuttle_time"] = SScargo.get_pending_shipment_time("submitted") + SScargo.min_movetime
data["order_submitted_shuttle_price"] = SScargo.get_pending_shipment_cost("submitted")
if(page == "overview_submitted")
data["order_list"] = submitted_orders
@@ -42,7 +46,7 @@
data["order_approved_number"] = approved_orders.len
data["order_approved_value"] = SScargo.get_orders_value_by_status("approved",1)
data["order_approved_suppliers"] = SScargo.get_order_suppliers_by_status("approved",1)
- data["order_approved_shuttle_time"] = SScargo.get_pending_shipment_time("approved")
+ data["order_approved_shuttle_time"] = SScargo.get_pending_shipment_time("approved") + SScargo.min_movetime
data["order_approved_shuttle_price"] = SScargo.get_pending_shipment_cost("approved")
if(page == "overview_approved")
data["order_list"] = approved_orders
@@ -59,8 +63,7 @@
if(page == "overview_delivered")
data["order_list"] = delivered_orders
- if(length(order_details))
- data["order_details"] = order_details
+ data["order_details"] = order_details
if(page == "overview_shipments")
data["shipment_list"] = SScargo.get_shipment_list()
@@ -109,24 +112,33 @@
//Page switch between main, submitted, approved and settings
if("page")
switch(params["page"])
+ //Main overview page with links to the different sub overview pages - submitted, approved, shipped
if("overview_main")
- page = "overview_main" //Main overview page with links to the different sub overview pages - submitted, approved, shipped
+ page = "overview_main"
+ //Overview page listing the orders that have been submitted with options to view them, approve them and reject them
if("overview_submitted")
- page = "overview_submitted" //Overview page listing the orders that have been submitted with options to view them, approve them and reject them
+ page = "overview_submitted"
+ //Overview page listing the current elevator price and time as well as orders that have been approved, with options to view the details
if("overview_approved")
- page = "overview_approved" //Overview page listing the current shuttle price and time as well as orders that have been approved, with options to view the details
+ page = "overview_approved"
+ //Overview page listing the orders that have been moved to the top of the cargo elevator but not delivered
if("overview_shipped")
- page = "overview_shipped" //Overview page listing the orders that have been shipped to the station but not delivered
+ page = "overview_shipped"
+ //Overview page listing the orders that have been delivered
if("overview_delivered")
- page = "overview_delivered" //Overview page listing the orders that have been delivered
- if("overview_shipments") //Overview of the shipments to / from the station
+ page = "overview_delivered"
+ //Overview of the shipments to / from the ship
+ if("overview_shipments")
page = "overview_shipments"
+ //Settings page that allows to tweak various settings such as the cargo handling fee
if("settings")
- page = "settings" //Settings page that allows to tweak various settings such as the cargo handling fee
+ page = "settings"
+ //Page listing the currently available centcom bounties
if("bounties")
- page = "bounties" //Page listing the currently available centcom bounties
+ page = "bounties"
+ //fall back to overview_main if a unknown page has been supplied
else
- page = "overview_main" //fall back to overview_main if a unknown page has been supplied
+ page = "overview_main"
return TRUE
//Approve a order
@@ -170,7 +182,13 @@
//Clear Status Message
if("clear_message")
- status_message = null
+ status_message = "Awaiting input"
+ return TRUE
+
+ //Clear selected order
+ if("clear_order")
+ order_details = null
+ status_message = "Selected order cleared."
return TRUE
//Change the handling fee
@@ -252,7 +270,8 @@
else
computer.visible_message(SPAN_NOTICE("\The [computer] prints out paper."))
-/datum/computer_file/program/civilian/cargocontrol/proc/post_signal(var/command) //Old code right here - Used to send a refresh command to the status screens incargo
+//Old code right here - Used to send a refresh command to the status screens incargo
+/datum/computer_file/program/civilian/cargocontrol/proc/post_signal(var/command)
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
if(!frequency)
diff --git a/code/modules/modular_computers/file_system/programs/civilian/cargo_delivery.dm b/code/modules/modular_computers/file_system/programs/civilian/cargo_delivery.dm
index 9f1fdb58f86..355450f1afe 100644
--- a/code/modules/modular_computers/file_system/programs/civilian/cargo_delivery.dm
+++ b/code/modules/modular_computers/file_system/programs/civilian/cargo_delivery.dm
@@ -74,7 +74,6 @@
//Check if its already delivered
if(order_details["status"] == "delivered")
status_message = "Unable to Deliver - Order has already been delivered."
- return TRUE
//If a payment is not needed and we are at the status shipped, then confirm the delivery
else if(order_details["status"] == "shipped")
@@ -83,10 +82,9 @@
order_details = co.get_list()
else
status_message = "The order is not yet shipped."
- return TRUE
else
status_message = "Unable to process - Network Card or Card Reader Missing"
- return TRUE
+ return TRUE
if(action == "pay")
if(computer && computer.card_slot && computer.network_card)
@@ -144,15 +142,17 @@
playsound(computer, 'sound/machines/chime.ogg', 50, TRUE)
status_message = co.set_paid(GetNameAndAssignmentFromId(id_card), usr.character_id, destinationact)
order_details = co.get_list()
+ return TRUE
else
status_message = "Unable to process - Network Card or Card Reader Missing"
- return TRUE
+ return FALSE
-
- //But only cargo can switch between the pages
- if(!istype(I) || !I.registered_name || !(ACCESS_CARGO in I.access) || issilicon(usr))
- to_chat(usr, SPAN_WARNING("Authentication error: Unable to locate ID with appropriate access to allow this operation."))
- return
+ if(action == "clear_order")
+ co = null
+ order_details = list()
+ status_message = "Selected order cleared."
+ page = "overview_main"
+ return TRUE
if(action == "page")
status_message = null //Null the previous status, so its not confusing
@@ -163,15 +163,19 @@
page = "order_overview" //Details page for a specific order - Lists the contents of the orde with the suppliers, prices and required access levels
//Fetch the order details and store it for the order. No need to fetch it again every 2 seconds
co = SScargo.get_order_by_id(text2num(params["order_overview"]))
- order_details = co.get_list()
+ order_details = co?.get_list()
if("order_payment")
page = "order_payment"
co = SScargo.get_order_by_id(text2num(params["order_payment"]))
- order_details = co.get_list()
+ order_details = co?.get_list()
else
page = "overview_main" //fall back to overview_main if a unknown page has been supplied
return TRUE
+
if(action == "accountselect")
+ // Only cargo can switch between the paying accounts
+ if(!access_check(I))
+ return FALSE
var/list/choices = assoc_to_keys(SSeconomy.department_accounts)
choices += "Personal"
var/dest = tgui_input_list(usr, "What account would you like to select?", "Destination Account", choices)
@@ -179,3 +183,24 @@
return FALSE
destinationact = dest
return TRUE
+
+ //Print functions
+ if(action == "order_print")
+ if(!access_check(I))
+ return FALSE
+ //Get the order
+ var/datum/cargo_order/co = SScargo.get_order_by_id(text2num(params["order_print"]))
+ if(co && computer.nano_printer)
+ if(!computer.nano_printer.print_text(co.get_report_invoice(),"Order Invoice #[co.order_id]"))
+ to_chat(usr, SPAN_WARNING("Hardware error: Printer was unable to print the file. It may be out of paper."))
+ return
+ else
+ computer.visible_message(SPAN_NOTICE("\The [computer] prints out paper."))
+ return TRUE
+
+// Cargo access check
+/datum/computer_file/program/civilian/cargodelivery/proc/access_check(var/obj/item/card/id/I)
+ if(!istype(I) || !I.registered_name || !(ACCESS_CARGO in I.access) || issilicon(usr))
+ to_chat(usr, SPAN_WARNING("Authentication error: Unable to locate ID with appropriate access to allow this operation."))
+ return FALSE
+ return TRUE
diff --git a/html/changelogs/OrionTheme.yml b/html/changelogs/OrionTheme.yml
new file mode 100644
index 00000000000..60856495764
--- /dev/null
+++ b/html/changelogs/OrionTheme.yml
@@ -0,0 +1,10 @@
+author: TheGreyWolf
+
+delete-after: True
+
+changes:
+ - rscadd: "Added a new Orion theme and applied it to the cargo control, cargo order and cargo delivery programs."
+ - rscadd: "Modular computers can now have a front page theme defined. Currently this is only applied to the operations delivery tablets."
+ - bugfix: "Fixed some issues with the cargo programs displaying the wrong delivery time."
+ - rscadd: "Added the ability to clear the currently selected order in the delivery program and cargo control program."
+ - rscadd: "It is now possible to print invoices from the cargo delivery program."
diff --git a/tgui/packages/tgui/assets/bg-orion.svg b/tgui/packages/tgui/assets/bg-orion.svg
new file mode 100644
index 00000000000..7a916151410
--- /dev/null
+++ b/tgui/packages/tgui/assets/bg-orion.svg
@@ -0,0 +1,45 @@
+
+
diff --git a/tgui/packages/tgui/index.tsx b/tgui/packages/tgui/index.tsx
index 0c2d12760cb..22e6a1ff72c 100644
--- a/tgui/packages/tgui/index.tsx
+++ b/tgui/packages/tgui/index.tsx
@@ -34,6 +34,7 @@ import './styles/themes/hephaestus.scss';
import './styles/themes/sol.scss';
import './styles/themes/vaurca.scss';
import './styles/themes/amberpos.scss';
+import './styles/themes/orion.scss';
import { setupGlobalEvents } from 'tgui-core/events';
import { setupHotKeys } from 'tgui-core/hotkeys';
diff --git a/tgui/packages/tgui/interfaces/CargoControl.tsx b/tgui/packages/tgui/interfaces/CargoControl.tsx
index 4a599b5bb11..204826e06e3 100644
--- a/tgui/packages/tgui/interfaces/CargoControl.tsx
+++ b/tgui/packages/tgui/interfaces/CargoControl.tsx
@@ -115,7 +115,7 @@ export const CargoControl = (props) => {
// FUCK THE WAY THESE FUCKING TOPIC CALLS WERE MADE
// THIS BULLSHIT GAVE ME ARTHRITIS
return (
-
+ {
>
}
>
-
+
{data.status_message}
@@ -203,7 +198,16 @@ export const CargoControl = (props) => {
{showAppropriateWindow(data.page)}
{data.order_details && (
-
+ act('clear_order')}
+ />
+ }
+ >
{data.order_details.order_id}
@@ -359,16 +363,17 @@ export const OverviewSubmitted = (props) => {