mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-10 01:13:07 +00:00
Configuration Controller (#7857)
This commit is contained in:
@@ -8,9 +8,9 @@ GLOBAL_DATUM(vgs, /datum/tgs_api)
|
||||
if(current_api)
|
||||
TGS_ERROR_LOG("API datum already set (\ref[current_api] ([current_api]))! Was TgsNew() called more than once?")
|
||||
return
|
||||
|
||||
|
||||
// If we don't have a configured access identifier we aren't meant to use VGS
|
||||
if(!config.vgs_access_identifier)
|
||||
if(!CONFIG_GET(string/vgs_access_identifier)) // CHOMPEdit
|
||||
TGS_INFO_LOG("Skipping VGS: No access identifier configured")
|
||||
return
|
||||
|
||||
@@ -60,9 +60,9 @@ GLOBAL_DATUM(vgs, /datum/tgs_api)
|
||||
|
||||
// Override to prevent error messages from the lack of revision/test_merge information, and to use config isntead of params.
|
||||
/datum/tgs_api/v5/vgs1/OnWorldNew()
|
||||
if(config.vgs_server_port)
|
||||
server_port = config.vgs_server_port
|
||||
access_identifier = config.vgs_access_identifier
|
||||
if(CONFIG_GET(number/vgs_server_port)) // CHOMPEdit
|
||||
server_port = CONFIG_GET(number/vgs_server_port) // CHOMPEdit
|
||||
access_identifier = CONFIG_GET(string/vgs_access_identifier) // CHOMPEdit
|
||||
|
||||
var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands())) //CHOMPEdit TGS update
|
||||
if(!istype(bridge_response))
|
||||
|
||||
@@ -156,5 +156,5 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations)
|
||||
/datum/tgs_chat_command/readfax/Run(sender, params)
|
||||
var/list/all_params = splittext(params, " ")
|
||||
var/faxid = all_params[1]
|
||||
var/faxmsg = return_file_text("[config.fax_export_dir]/fax_[faxid].html")
|
||||
var/faxmsg = return_file_text("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html") // CHOMPEdit
|
||||
return "FAX: ```[strip_html_properly(faxmsg)]```"
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
html = data_core.get_manifest(FALSE,TRUE,snowflake = TRUE)
|
||||
else
|
||||
html = "<b>ERROR: NO DATACORE</b>" //Could make the error more fancy later
|
||||
rustg_file_write(html,"[config.nodebot_location]\\html.html")
|
||||
rustg_file_write(html,"[CONFIG_GET(string/nodebot_location)]\\html.html")
|
||||
|
||||
/datum/tgs_chat_command/manifest/Run(datum/tgs_chat_user/sender, params)
|
||||
if(config.nodebot_enabled)
|
||||
if(CONFIG_GET(flag/nodebot_enabled))
|
||||
ManifestToHtml()
|
||||
return "http://manifest.chompstation13.net/"
|
||||
else
|
||||
@@ -104,9 +104,9 @@
|
||||
/datum/tgs_chat_command/readfax/Run(sender, params)
|
||||
var/list/all_params = splittext(params, " ")
|
||||
var/faxid = all_params[1]
|
||||
if(!all_params[1] || !fexists("[config.fax_export_dir]/fax_[faxid].html"))
|
||||
if(!all_params[1] || !fexists("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html"))
|
||||
return "I’m sorry Dave, I’m afraid I can’t do that"
|
||||
var/faxmsg = return_file_text("[config.fax_export_dir]/fax_[faxid].html")
|
||||
var/faxmsg = return_file_text("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html")
|
||||
return "FAX: ```[strip_html_properly(faxmsg)]```"
|
||||
|
||||
/datum/tgs_chat_command/vore
|
||||
|
||||
Reference in New Issue
Block a user