Files
Bubberstation/code/modules/admin/verbs/config_helpers.dm
SkyratBot 84e42fd0eb [MIRROR] Removes some code soul (IF YOU ARE COPY PASTING THIS...), replaces it with a macro [MDB IGNORE] (#25272)
* Removes some code soul (`IF YOU ARE COPY PASTING THIS...`), replaces it with a macro (#79935)

## About The Pull Request

Replaces all instances of `SSblackbox.record_feedback\("tally",
"admin_verb", 1, (.+)\)` with `BLACKBOX_LOG_ADMIN_VERB($1)`

This makes so the funny comment isn't necessary.

It also reveals one location which someone did not heed the comment, the
`debug_controller` proc copy+pasted the line but did not change the
fourth argument. PEOPLE DON'T READ!

* Removes some code soul (`IF YOU ARE COPY PASTING THIS...`), replaces it with a macro

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-11-27 01:02:37 -05:00

20 lines
1.0 KiB
Plaintext

/// Verbs created to help server operators with generating certain config files.
/client/proc/generate_job_config()
set name = "Generate Job Configuration"
set category = "Server"
set desc = "Generate a job configuration (jobconfig.toml) file for the server. If TOML file already exists, will re-generate it based off the already existing config values. Will migrate from the old jobs.txt format if necessary."
if(!check_rights(R_SERVER))
return
if(tgui_alert(usr, "This verb is not at all useful if you are not a server operator with access to the configuration folder. Do you wish to proceed?", "Generate jobconfig.toml for download", list("Yes", "No")) != "Yes")
return
if(SSjob.generate_config(usr))
to_chat(usr, span_notice("Job configuration file generated. Download prompt should appear now."))
else
to_chat(usr, span_warning("Job configuration file could not be generated. Check the server logs / runtimes / above warning messages for more information."))
BLACKBOX_LOG_ADMIN_VERB("Generate Job Configuration")