A large set of ops program fixes + elevator ghost sound fix (#22278)

- bugfix: "Fixed the operations status display screens not showing the
elevator status."
- bugfix: "Fixed the cargo delivery program not displaying the account
that was used to pay for an order with."
- bugfix: "Fixed the cargo delivery program not displaying shipped
orders regardless of payment status."
- bugfix: "Fixed the ghostly ambience on the operations lift and the
lift near security."
- bugfix: "The operations program now displays the elevator time in
seconds instead of minutes, given the minutes would always show 0."
This commit is contained in:
Casper3667
2026-04-19 07:28:40 +02:00
committed by GitHub
parent 90ceccb06b
commit deab6b4e99
10 changed files with 35 additions and 23 deletions
+4 -2
View File
@@ -285,13 +285,15 @@ SUBSYSTEM_DEF(cargo)
Submitting, Approving, Rejecting and Shipping Orders
*/
// Gets the orders based on their status (submitted, approved, shipped).
/datum/controller/subsystem/cargo/proc/get_orders_by_status(var/status, var/data_list=0)
/datum/controller/subsystem/cargo/proc/get_orders_by_status(status, data_list = FALSE, list/avoid)
if(!status)
log_subsystem_cargo("get_orders_by_status has been called with a invalid status")
return list()
var/list/orders = list()
for (var/datum/cargo_order/co in all_orders)
if(co.status == status)
if(co.status == status || co.get_payment_status() == status)
if(avoid && (avoid.Find(co.status) || avoid.Find(co.get_payment_status())))
continue
if(data_list)
orders.Add(list(co.get_list()))
else
+6 -4
View File
@@ -18,6 +18,7 @@
var/received_by_id = null //Character ID of the person that received the items
var/paid_by = null //Person that has paid for the order
var/paid_by_id = null //Character ID of the Person that paid for the items
var/paying_account = null
var/time_submitted = null //Time the order has been sent to cargo
var/time_approved = null //Time the order has been approved by cargo
var/time_shipped = null //Time the order has been shipped to the station
@@ -226,14 +227,14 @@
/datum/cargo_order/proc/get_payment_status(var/pretty=1)
if(pretty)
if(paid_by != null)
return "Paid by [paid_by]"
return "Paid by [paid_by] using [(paying_account == "Personal") ? "their personal" : "the [paying_account]"] account"
else
return "Unpaid"
else
if(paid_by != null)
return 1
return TRUE
else
return 0
return FALSE
// Returns a Invoice for the Order
/datum/cargo_order/proc/get_report_invoice()
@@ -350,12 +351,13 @@
return "The order could not be delivered - Invalid Status"
//Mark a order as paid
/datum/cargo_order/proc/set_paid(var/user_name, var/user_id)
/datum/cargo_order/proc/set_paid(user_name, user_id, account_charged)
if(user_id <= 0)
user_id = null
time_paid = worldtime2text()
paid_by = user_name
paid_by_id = user_id
paying_account = account_charged
return "The order has been paid for"
/// A cargo order item. Part of a category. Specifies the item, the supplier and the price of the item
+1 -1
View File
@@ -70,7 +70,7 @@
remove_display()
update_lighting()
return
if((mode == STATUS_DISPLAY_TIME) && (message2 != worldtime2text()))
if((mode == STATUS_DISPLAY_TIME) && (message2 != worldtime2text()) || ((mode == STATUS_DISPLAY_CUSTOM)))
update()
/obj/machinery/status_display/update_use_power(new_use_power)
@@ -4,7 +4,7 @@
header_text_color = COLOR_DISPLAY_YELLOW
/obj/machinery/status_display/supply_display/update()
if(!..() && mode == STATUS_DISPLAY_CUSTOM)
if(mode == STATUS_DISPLAY_CUSTOM)
var/message1 = "CARGO"
var/message2 = ""
@@ -22,10 +22,11 @@
if(shuttle.at_station())
message2 = "Elevator Arrived"
else
message1 = ""
message2 = "Elevator Stowed"
set_messages(message1, message2)
arrange_displayed_texts(message1, message2)
return 0
return TRUE
..()
/obj/machinery/status_display/supply_display/receive_signal(datum/signal/signal)
if(signal.data["command"] == "supply")
@@ -79,7 +79,7 @@
if(shuttle)
data["shuttle_available"] = 1
data["shuttle_has_arrive_time"] = shuttle.has_arrive_time()
data["shuttle_eta_minutes"] = shuttle.eta_minutes()
data["shuttle_eta_seconds"] = shuttle.eta_seconds()
data["shuttle_can_launch"] = shuttle.can_launch()
data["shuttle_can_cancel"] = shuttle.can_cancel()
data["shuttle_can_force"] = shuttle.can_force()
@@ -36,7 +36,9 @@
data["id_name"] = id_card ? id_card.name : "-----"
//Pass the shipped orders
data["order_list"] = SScargo.get_orders_by_status("shipped",1) + SScargo.get_orders_by_status("approved",1)
var/list/order_list = SScargo.get_orders_by_status("shipped", TRUE) + SScargo.get_orders_by_status("approved", TRUE) + SScargo.get_orders_by_status("Unpaid", TRUE, list("shipped", "approved"))
data["order_list"] = order_list
//Pass along the order details
data["order_details"] = order_details
@@ -137,7 +139,7 @@
charge_card.worth -= transaction_amount
playsound(computer, 'sound/machines/chime.ogg', 50, TRUE)
status_message = co.set_paid(GetNameAndAssignmentFromId(id_card), usr.character_id)
status_message = co.set_paid(GetNameAndAssignmentFromId(id_card), usr.character_id, destinationact)
order_details = co.get_list()
else
status_message = "Unable to process - Network Card or Card Reader Missing"
+3 -3
View File
@@ -154,10 +154,10 @@
/datum/shuttle/autodock/ferry/supply/proc/idle()
return (moving_status == SHUTTLE_IDLE)
//returns the ETA in minutes
/datum/shuttle/autodock/ferry/supply/proc/eta_minutes()
//returns the ETA in seconds
/datum/shuttle/autodock/ferry/supply/proc/eta_seconds()
var/ticksleft = arrive_time - world.time
return round(ticksleft/600,1)
return round(ticksleft/10,1)
/**************************
Elevator Animations
@@ -0,0 +1,10 @@
author: TheGreyWolf
delete-after: True
changes:
- bugfix: "Fixed the operations status display screens not showing the elevator status."
- bugfix: "Fixed the cargo delivery program not displaying the account that was used to pay for an order with."
- bugfix: "Fixed the cargo delivery program not displaying shipped orders regardless of payment status."
- bugfix: "Fixed the ghostly ambience on the operations lift and the lift near security."
- bugfix: "The operations program now displays the elevator time in seconds instead of minutes, given the minutes would always show 0."
@@ -141,8 +141,6 @@
/area/turbolift/scc_ship/operations_lift
name = "Operations Lift"
sound_environment = SOUND_AREA_TUNNEL_ENCLOSED
ambience = AMBIENCE_GHOSTLY
//Robotics Lift
/datum/shuttle/autodock/multi/lift/robotics
@@ -185,6 +183,3 @@
/area/turbolift/scc_ship/robotics_lift
name = "Robotics Lift"
sound_environment = SOUND_AREA_TUNNEL_ENCLOSED
ambience = AMBIENCE_GHOSTLY
@@ -39,7 +39,7 @@ export type CargoData = {
have_printer: BooleanLike;
shuttle_available: BooleanLike;
shuttle_has_arrive_time: BooleanLike;
shuttle_eta_minutes: number;
shuttle_eta_seconds: number;
shuttle_can_launch: BooleanLike;
shuttle_can_cancel: BooleanLike;
shuttle_can_force: BooleanLike;
@@ -303,7 +303,7 @@ export const MainWindow = (props, context) => {
<Section title="Elevator Information">
<LabeledList>
<LabeledList.Item label="ETA">
{data.shuttle_eta_minutes} minutes
{data.shuttle_eta_seconds} seconds
</LabeledList.Item>
</LabeledList>
</Section>