mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
enhancements for fax requests in request manager (#88391)
## About The Pull Request Addition to [#84910](https://github.com/tgstation/tgstation/pull/84910) Added a "print" button to the request manager. It simply prints at the centcom station the paper that was faxed to the admins. Also added "Auto-print Faxes" button to the request manager, which allows you to enable automatic printing of requests on the admin fax <details> <summary>Screenshots</summary>    </details> ## Why It's Good For The Game The message in the chat may get lost. In this case, it will no longer be possible to print the paper sent to the CC Changing the allow_exotic_faxes variable will allow you to fax something unusual to the station in (very rare) situations. No need to manually change this variable ## Changelog 🆑 add: added a "print" button to the request manager add: admin fax can now send exotic items add: added "Auto-print Faxes" button to the request manager, which allows you to enable automatic printing of requests on the admin fax fix: fixed a bug where pressing the print button would cause the receive animation to appear on all admin faxes. /🆑
This commit is contained in:
@@ -154,6 +154,10 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
|
||||
to_chat(usr, "You do not have permission to do this, you require +ADMIN", confidential = TRUE)
|
||||
return
|
||||
|
||||
if (action == "toggleprint")
|
||||
GLOB.fax_autoprinting = !GLOB.fax_autoprinting
|
||||
return TRUE
|
||||
|
||||
// Get the request this relates to
|
||||
var/id = params["id"] != null ? text2num(params["id"]) : null
|
||||
if (!id)
|
||||
@@ -228,9 +232,20 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
|
||||
if(request.req_type != REQUEST_FAX)
|
||||
to_chat(usr, "Request doesn't have a paper to read.", confidential = TRUE)
|
||||
return TRUE
|
||||
var/obj/item/paper/request_message = request.additional_information
|
||||
var/obj/item/paper/request_message = request.additional_information["paper"]
|
||||
request_message.ui_interact(usr)
|
||||
return TRUE
|
||||
if ("print")
|
||||
if (request.req_type != REQUEST_FAX)
|
||||
to_chat(usr, "Request doesn't have a paper to print.", confidential = TRUE)
|
||||
return TRUE
|
||||
for(var/obj/machinery/fax/admin/FAX as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax/admin))
|
||||
if(FAX.fax_id != request.additional_information["destination_id"])
|
||||
continue
|
||||
var/obj/item/paper/request_message = request.additional_information["paper"]
|
||||
var/sender_name = request.additional_information["sender_name"]
|
||||
FAX.receive(request_message, sender_name)
|
||||
return TRUE
|
||||
if ("play")
|
||||
if(request.req_type != REQUEST_INTERNET_SOUND)
|
||||
to_chat(usr, "Request doesn't have a sound to play.", confidential = TRUE)
|
||||
@@ -257,6 +272,7 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
|
||||
"timestamp" = request.timestamp,
|
||||
"timestamp_str" = gameTimestamp(wtime = request.timestamp)
|
||||
))
|
||||
data["fax_autoprinting"] = GLOB.fax_autoprinting
|
||||
return data
|
||||
|
||||
#undef REQUEST_PRAYER
|
||||
|
||||
Reference in New Issue
Block a user