[MIRROR] Admins can now add footnotes to the roundstart command report [MDB IGNORE] (#17897)

* Admins can now add footnotes to the roundstart command report

* Update adminevents.dm

Co-authored-by: Rhials <Datguy33456@gmail.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-12-04 07:29:39 -08:00
committed by GitHub
co-authored by Rhials Zonespace
parent eec317a0ef
commit b236e4b0ce
5 changed files with 70 additions and 0 deletions
@@ -13,6 +13,11 @@ SUBSYSTEM_DEF(communications)
/// Are we trying to send a cross-station message that contains soft-filtered words? If so, flip to TRUE to extend the time admins have to cancel the message.
var/soft_filtering = FALSE
/// A list of footnote datums, to be added to the bottom of the roundstart command report.
var/list/command_report_footnotes = list()
/// A counter of conditions that are blocking the command report from printing. Counter incremements up for every blocking condition, and de-incrememnts when it is complete.
var/block_command_report = 0
/datum/controller/subsystem/communications/proc/can_announce(mob/living/user, is_silicon)
if(is_silicon && COOLDOWN_FINISHED(src, silicon_message_cooldown))
return TRUE
+6
View File
@@ -294,6 +294,10 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return ..()
/datum/game_mode/dynamic/proc/send_intercept()
if(SScommunications.block_command_report) //If we don't want the report to be printed just yet, we put it off until it's ready
addtimer(CALLBACK(src, PROC_REF(send_intercept)), 10 SECONDS)
return
. = "<b><i>Nanotrasen Department of Intelligence Threat Advisory, Spinward Sector, TCD [time2text(world.realtime, "DDD, MMM DD")], [CURRENT_STATION_YEAR]:</i></b><hr>"
switch(round(shown_threat))
if(0 to 19)
@@ -333,6 +337,8 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
generate_station_goals(greenshift)
. += generate_station_goal_report()
. += generate_station_trait_report()
if(length(SScommunications.command_report_footnotes))
. += generate_report_footnote()
print_command_report(., "Central Command Status Summary", announce=FALSE)
if(greenshift)
+10
View File
@@ -98,6 +98,16 @@
return "<hr><b>Identified shift divergencies:</b><BR>" + trait_list_string
return
/datum/game_mode/proc/generate_report_footnote()
var/footnote_pile = ""
for(var/datum/command_footnote/footnote in SScommunications.command_report_footnotes)
footnote_pile += "[footnote.message]<BR>"
footnote_pile += "<i>[footnote.signature]</i><BR>"
footnote_pile += "<BR>"
return "<hr><b>Additional Notes: </b><BR><BR>" + footnote_pile
/proc/reopen_roundstart_suicide_roles()
var/include_command = CONFIG_GET(flag/reopen_roundstart_suicide_roles_command_positions)
var/list/reopened_jobs = list()
+2
View File
@@ -137,6 +137,8 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
/client/proc/admin_away,
/client/proc/add_mob_ability,
/client/proc/remove_mob_ability,
/client/proc/command_report_footnote,
/client/proc/delay_command_report,
/datum/admins/proc/station_traits_panel,
/client/proc/spawn_pollution, // SKYRAT EDIT ADDITION
/client/proc/spawn_liquid, // SKYRAT EDIT ADDITION
+47
View File
@@ -385,3 +385,50 @@
message_admins("[key_name_admin(usr)] removed ability [ability_name] from mob [marked_mob].")
log_admin("[key_name(usr)] removed mob ability [ability_name] from mob [marked_mob].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Remove Mob Ability") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/command_report_footnote()
set category = "Admin.Events"
set name = "Command Report Footnote"
set desc = "Adds a footnote to the roundstart command report."
if(!check_rights(R_ADMIN))
return
var/datum/command_footnote/command_report_footnote = new /datum/command_footnote()
SScommunications.block_command_report++ //Add a blocking condition to the counter until the inputs are done.
command_report_footnote.message = tgui_input_text(usr, "This message will be attached to the bottom of the roundstart threat report. Be sure to delay the roundstart report if you need extra time.", "P.S.")
if(!command_report_footnote.message)
return
command_report_footnote.signature = tgui_input_text(usr, "Whose signature will appear on this footnote?", "Also sign here, here, aaand here.")
if(!command_report_footnote.signature)
command_report_footnote.signature = "Classified"
SScommunications.command_report_footnotes += command_report_footnote
SScommunications.block_command_report--
message_admins("[usr] has added a footnote to the command report: [command_report_footnote.message], signed [command_report_footnote.signature]")
/datum/command_footnote
var/message
var/signature
/client/proc/delay_command_report()
set category = "Admin.Events"
set name = "Delay Command Report"
set desc = "Prevents the roundstart command report from being sent until toggled."
if(!check_rights(R_ADMIN))
return
if(SScommunications.block_command_report) //If it's anything other than 0, decrease. If 0, increase.
SScommunications.block_command_report--
message_admins("[usr] has enabled the roundstart command report.")
else
SScommunications.block_command_report++
message_admins("[usr] has delayed the roundstart command report.")