mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-06 07:32:15 +00:00
URL configuration
This commit is contained in:
@@ -33,6 +33,8 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
var/datum/configuration_section/ruin_configuration/ruins
|
||||
/// Holder for the system configuration datum
|
||||
var/datum/configuration_section/system_configuration/system
|
||||
/// Holder for the URL configuration datum
|
||||
var/datum/configuration_section/url_configuration/url
|
||||
/// Holder for the voting configuration datum
|
||||
var/datum/configuration_section/vote_configuration/vote
|
||||
|
||||
@@ -63,6 +65,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
overflow = new()
|
||||
ruins = new()
|
||||
system = new()
|
||||
url = new()
|
||||
vote = new()
|
||||
|
||||
// Load our stuff up
|
||||
@@ -87,6 +90,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
overflow.load_data(raw_config_data["overflow_configuration"])
|
||||
ruins.load_data(raw_config_data["ruin_configuration"])
|
||||
system.load_data(raw_config_data["system_configuration"])
|
||||
url.load_data(raw_config_data["url_configuration"])
|
||||
vote.load_data(raw_config_data["voting_configuration"])
|
||||
|
||||
// And report the load
|
||||
|
||||
47
code/controllers/configuration/sections/url_configuration.dm
Normal file
47
code/controllers/configuration/sections/url_configuration.dm
Normal file
@@ -0,0 +1,47 @@
|
||||
/// Config holder for all the server URLs
|
||||
/datum/configuration_section/url_configuration
|
||||
// Dont tweak these. You can read them though.
|
||||
protection_state = PROTECTION_READONLY
|
||||
/// List of URLs for the server RSC data
|
||||
var/list/rsc_urls = list()
|
||||
/// Server URL for auto-reconnecting people at end round
|
||||
var/server_url
|
||||
/// URL for the server ban appeals forum
|
||||
var/banappeals_url
|
||||
/// URL for the server wiki
|
||||
var/wiki_url
|
||||
/// URL for the server forums
|
||||
var/forum_url
|
||||
/// URL for the server rules
|
||||
var/rules_url
|
||||
/// URL for the server github repository
|
||||
var/github_url
|
||||
/// URL for server donations
|
||||
var/donations_url
|
||||
/// URL for a direct discord invite
|
||||
var/discord_url
|
||||
/// URL for a discord invite going via the forums
|
||||
var/discord_forum_url
|
||||
/// URL for linking ingame accounts and forum accounts. Token is appended to end
|
||||
var/forum_link_url
|
||||
/// URL for pulling player info on webtools
|
||||
var/forum_playerinfo_url
|
||||
/// URL for the CentCom Ban DB API
|
||||
var/centcom_ban_db_url
|
||||
|
||||
/datum/configuration_section/url_configuration/load_data(list/data)
|
||||
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
|
||||
CONFIG_LOAD_LIST(rsc_urls, data["rsc_urls"])
|
||||
|
||||
CONFIG_LOAD_STR(server_url, data["reboot_url"])
|
||||
CONFIG_LOAD_STR(banappeals_url, data["ban_appeals_url"])
|
||||
CONFIG_LOAD_STR(wiki_url, data["wiki_url"])
|
||||
CONFIG_LOAD_STR(forum_url, data["forum_url"])
|
||||
CONFIG_LOAD_STR(rules_url, data["rules_url"])
|
||||
CONFIG_LOAD_STR(github_url, data["github_url"])
|
||||
CONFIG_LOAD_STR(donations_url, data["donations_url"])
|
||||
CONFIG_LOAD_STR(discord_url, data["discord_url"])
|
||||
CONFIG_LOAD_STR(discord_forum_url, data["discord_forum_url"])
|
||||
CONFIG_LOAD_STR(forum_link_url, data["forum_link_url"])
|
||||
CONFIG_LOAD_STR(forum_playerinfo_url, data["forum_playerinfo_url"])
|
||||
CONFIG_LOAD_STR(centcom_ban_db_url, data["centcomm_ban_db_url"])
|
||||
Reference in New Issue
Block a user