CCIA Variable Fax Stamp Text (#17444)

Allows CCIA to use a customizable Test for the "This paper has been stamped..."-Text on the faxes.

Co-authored-by: Werner <Arrow768@users.noreply.github.com>
This commit is contained in:
Werner
2023-09-28 21:08:50 +02:00
committed by GitHub
parent 67b0c60247
commit 6225927765
3 changed files with 52 additions and 6 deletions

View File

@@ -12,8 +12,8 @@
var/versionstring = null
//The Version Number follows SemVer http://semver.org/
version["major"] = 3 //Major Version Number --> Increment when implementing breaking changes
version["minor"] = 0 //Minor Version Number --> Increment when adding features
version["patch"] = 1 //Patchlevel --> Increment when fixing bugs
version["minor"] = 1 //Minor Version Number --> Increment when adding features
version["patch"] = 0 //Patchlevel --> Increment when fixing bugs
versionstring = "[version["major"]].[version["minor"]].[version["patch"]]"

View File

@@ -183,7 +183,8 @@
"senderkey" = list("name"="senderkey","desc"="Unique id of the person that sent the fax","req"=1,"type"="senderkey"),
"title" = list("name"="title","desc"="The message title that should be sent","req"=1,"type"="str"),
"body" = list("name"="body","desc"="The message body that should be sent","req"=1,"type"="str"),
"target" = list("name"="target","desc"="The target faxmachines the fax should be sent to","req"=1,"type"="lst")
"target" = list("name"="target","desc"="The target faxmachines the fax should be sent to","req"=1,"type"="lst"),
"stamptext" = list("name"="stamptext","desc"="Who/What entity stamped the fax. To complete the Sentence: This paper has been stamped ...","req"=0,"type"="str")
)
/datum/topic_command/send_fax/run_command(queryparams)
@@ -194,6 +195,7 @@
var/faxtitle = sanitizeSafe(queryparams["title"]) //Title of the report
var/faxbody = sanitize(queryparams["body"],max_length=0) //Body of the report
var/faxannounce = text2num(queryparams["announce"]) //Announce the contents report to the public: 0 - Dont announce, 1 - Announce, 2 - Only if pda not linked
var/stamptext = sanitize(queryparams["stamptext"])
if(!targetlist || targetlist.len < 1)
statuscode = 400
@@ -207,7 +209,7 @@
//Send the fax
for (var/obj/machinery/photocopier/faxmachine/F in allfaxes)
if (F.department in targetlist)
sendresult = send_fax(F, faxtitle, faxbody, senderkey)
sendresult = send_fax(F, faxtitle, faxbody, senderkey, stamptext)
if (sendresult == 1)
sendsuccess.Add(F.department)
if(!LAZYLEN(F.alert_pdas))
@@ -233,7 +235,7 @@
data = responselist
return TRUE
/datum/topic_command/send_fax/proc/send_fax(var/obj/machinery/photocopier/faxmachine/F, title, body, senderkey)
/datum/topic_command/send_fax/proc/send_fax(var/obj/machinery/photocopier/faxmachine/F, title, body, senderkey, stamptext)
// Create the reply message
var/obj/item/paper/P = new /obj/item/paper( null ) //hopefully the null loc won't cause trouble for us
P.name = "[current_map.boss_name] - [title]"
@@ -247,6 +249,9 @@
P.stamped = new
P.stamped += /obj/item/stamp
P.add_overlay(stampoverlay)
if(stamptext)
P.stamps += "<HR><i>This paper has been stamped [stamptext].</i>"
else
P.stamps += "<HR><i>This paper has been stamped by the Central Command Quantum Relay.</i>"
if(F.receivefax(P))

View File

@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: arrow768
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "Allows CCIA to specify who stamped their faxes when they send them via the WI."