mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
Ports over configuration controller (#16484)
* Ports over configuration controller * Fixes * Manual path fix * patch (#16490) * patch * . * SQL Fix * Post-rebase fix * Added missing examples --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -470,16 +470,16 @@ Extracted to its own procedure for easier logic handling with paper bundles.
|
||||
if (istype(fax, /obj/item/paper))
|
||||
var/obj/item/paper/P = fax
|
||||
var/text = "<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[P.info][P.stamps]</BODY></HTML>";
|
||||
file("[config.fax_export_dir]/fax_[faxid].html") << text;
|
||||
file("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html") << text;
|
||||
else if (istype(fax, /obj/item/photo))
|
||||
var/obj/item/photo/H = fax
|
||||
fcopy(H.img, "[config.fax_export_dir]/photo_[faxid].png")
|
||||
fcopy(H.img, "[CONFIG_GET(string/fax_export_dir)]/photo_[faxid].png")
|
||||
var/text = "<html><head><title>[H.name]</title></head>" \
|
||||
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
|
||||
+ "<img src='photo_[faxid].png'>" \
|
||||
+ "[H.scribble ? "<br>Written on the back:<br><i>[H.scribble]</i>" : ""]"\
|
||||
+ "</body></html>"
|
||||
file("[config.fax_export_dir]/fax_[faxid].html") << text
|
||||
file("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html") << text
|
||||
else if (istype(fax, /obj/item/paper_bundle))
|
||||
var/obj/item/paper_bundle/B = fax
|
||||
var/data = ""
|
||||
@@ -488,7 +488,7 @@ Extracted to its own procedure for easier logic handling with paper bundles.
|
||||
var/page_faxid = export_fax(pageobj)
|
||||
data += "<a href='fax_[page_faxid].html'>Page [page] - [pageobj.name]</a><br>"
|
||||
var/text = "<html><head><title>[B.name]</title></head><body>[data]</body></html>"
|
||||
file("[config.fax_export_dir]/fax_[faxid].html") << text
|
||||
file("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html") << text
|
||||
return faxid
|
||||
|
||||
|
||||
@@ -497,16 +497,16 @@ Extracted to its own procedure for easier logic handling with paper bundles.
|
||||
* Call the chat webhook to transmit a notification of an admin fax to the admin chat.
|
||||
*/
|
||||
/obj/machinery/photocopier/faxmachine/proc/message_chat_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/faxid, font_colour="#006100")
|
||||
if (config.chat_webhook_url)
|
||||
if (CONFIG_GET(string/chat_webhook_url))
|
||||
spawn(0)
|
||||
var/query_string = "type=fax"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&faxid=[url_encode(faxid)]"
|
||||
query_string += "&color=[url_encode(font_colour)]"
|
||||
query_string += "&faxname=[url_encode(faxname)]"
|
||||
query_string += "&sendername=[url_encode(sender.name)]"
|
||||
query_string += "&sentname=[url_encode(sent.name)]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
|
||||
|
||||
|
||||
@@ -515,12 +515,12 @@ Extracted to its own procedure for easier logic handling with paper bundles.
|
||||
* Call the chat webhook to transmit a notification of a job request
|
||||
*/
|
||||
/obj/machinery/photocopier/faxmachine/proc/message_chat_rolerequest(var/font_colour="#006100", var/role_to_ping, var/reason, var/jobname)
|
||||
if(config.chat_webhook_url)
|
||||
if(CONFIG_GET(string/chat_webhook_url))
|
||||
spawn(0)
|
||||
var/query_string = "type=rolerequest"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&ping=[url_encode(role_to_ping)]"
|
||||
query_string += "&color=[url_encode(font_colour)]"
|
||||
query_string += "&reason=[url_encode(reason)]"
|
||||
query_string += "&job=[url_encode(jobname)]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
|
||||
Reference in New Issue
Block a user