Add a few networks to fax, which send papers to request manager, and staff can answer on them from fax panel. (#71129)

## About The Pull Request

This PR adds the ability to send faxes to a central command or
syndicate, which will be delivered to the admins in request format. And
also, a fax panel for admins has been added, which will allow them to
conveniently send a fax already back (including stamps)

![image](https://user-images.githubusercontent.com/78199449/200159547-4e5f1759-2879-459c-b84f-e6dedd5f1ccb.png)

![image](https://user-images.githubusercontent.com/78199449/200159551-951e235f-e2ac-4f92-a96f-72cba643e634.png)

![image](https://user-images.githubusercontent.com/78199449/200159552-57f3dcf6-5875-4b11-af58-22c0b0fb4ae2.png)

![image](https://user-images.githubusercontent.com/78199449/200159553-57fbf90c-f141-4c12-8879-81a842afe30f.png)


## Why It's Good For The Game

More bureacracy gaming.

## Changelog

🆑 Vishenka0704
add: A way to send faxes to CentCom/Syndicate
admin: New fax panel(with stamps!!!)
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Yaroslav Nurkov
2022-11-21 07:44:29 +00:00
committed by GitHub
co-authored by Mothblocks
parent aa966ea469
commit ec1115efff
13 changed files with 506 additions and 13 deletions
+4 -10
View File
@@ -1,12 +1,3 @@
/// Requests from prayers
#define REQUEST_PRAYER "request_prayer"
/// Requests for Centcom
#define REQUEST_CENTCOM "request_centcom"
/// Requests for the Syndicate
#define REQUEST_SYNDICATE "request_syndicate"
/// Requests for the nuke code
#define REQUEST_NUKE "request_nuke"
/**
* # Request
*
@@ -27,10 +18,12 @@
var/owner_name
/// The message associated with the request
var/message
/// Just any information, which you can to send with request. For example paper datum.
var/additional_information
/// When the request was created
var/timestamp
/datum/request/New(client/requestee, type, request)
/datum/request/New(client/requestee, type, request, additional_info)
if (!requestee)
qdel(src)
return
@@ -39,5 +32,6 @@
owner_ckey = owner.ckey
req_type = type
message = request
additional_information = additional_info
timestamp = world.time
owner_name = key_name(requestee, FALSE)
+37 -2
View File
@@ -1,3 +1,14 @@
/// Requests from prayers
#define REQUEST_PRAYER "request_prayer"
/// Requests for Centcom
#define REQUEST_CENTCOM "request_centcom"
/// Requests for the Syndicate
#define REQUEST_SYNDICATE "request_syndicate"
/// Requests for the nuke code
#define REQUEST_NUKE "request_nuke"
/// Requests somebody from fax
#define REQUEST_FAX "request_fax"
GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
/**
@@ -86,6 +97,16 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
/datum/request_manager/proc/nuke_request(client/C, message)
request_for_client(C, REQUEST_NUKE, message)
/**
* Creates a request for fax answer
*
* Arguments:
* * requester - The client who is sending the request
* * message - Paper with text.. some stamps.. and another things.
*/
/datum/request_manager/proc/fax_request(client/requester, message, additional_info)
request_for_client(requester, REQUEST_FAX, message, additional_info)
/**
* Creates a request and registers the request with all necessary internal tracking lists
*
@@ -94,8 +115,8 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
* * type - The type of request, see defines
* * message - The message
*/
/datum/request_manager/proc/request_for_client(client/C, type, message)
var/datum/request/request = new(C, type, message)
/datum/request_manager/proc/request_for_client(client/C, type, message, additional_info)
var/datum/request/request = new(C, type, message, additional_info)
if (!requests[C.ckey])
requests[C.ckey] = list()
requests[C.ckey] += request
@@ -193,6 +214,13 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
SD.r_code = code
message_admins("[key_name_admin(usr)] has set the self-destruct code to \"[code]\".")
return TRUE
if ("show")
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
request_message.ui_interact(usr)
return TRUE
/datum/request_manager/ui_data(mob/user)
. = list(
@@ -207,7 +235,14 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
"owner_ckey" = request.owner_ckey,
"owner_name" = request.owner_name,
"message" = request.message,
"additional_info" = request.additional_information,
"timestamp" = request.timestamp,
"timestamp_str" = gameTimestamp(wtime = request.timestamp)
)
.["requests"] += list(data)
#undef REQUEST_PRAYER
#undef REQUEST_CENTCOM
#undef REQUEST_SYNDICATE
#undef REQUEST_NUKE
#undef REQUEST_FAX