Ports over configuration controller (#16484)

* Ports over configuration controller

* Fixes

* Manual path fix

* patch (#16490)

* patch

* .

* SQL Fix

* Post-rebase fix

* Added missing examples

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2024-10-22 19:26:44 +02:00
committed by GitHub
co-authored by Kashargul
parent 25d323e8a8
commit 242fa3a66b
242 changed files with 3275 additions and 1257 deletions
+16 -16
View File
@@ -3,15 +3,15 @@
set name = "wiki"
set desc = "Type what you want to know about. This will open the wiki on your web browser."
set category = "OOC"
if(config.wikiurl)
if(CONFIG_GET(string/wikiurl))
if(query)
if(config.wikisearchurl)
var/output = replacetext(config.wikisearchurl, "%s", url_encode(query))
if(CONFIG_GET(string/wikisearchurl))
var/output = replacetext(CONFIG_GET(string/wikisearchurl), "%s", url_encode(query))
src << link(output)
else
to_chat(src, span_warning(" The wiki search URL is not set in the server configuration."))
else
src << link(config.wikiurl)
src << link(CONFIG_GET(string/wikiurl))
else
to_chat(src, span_warning("The wiki URL is not set in the server configuration."))
return
@@ -20,10 +20,10 @@
set name = "forum"
set desc = "Visit the forum."
set hidden = 1
if( config.forumurl )
if(CONFIG_GET(string/forumurl))
if(tgui_alert(usr, "This will open the forum in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(config.forumurl)
src << link(CONFIG_GET(string/forumurl))
else
to_chat(src, span_warning("The forum URL is not set in the server configuration."))
return
@@ -33,10 +33,10 @@
set desc = "Show Server Rules."
set hidden = 1
if(config.rulesurl)
if(CONFIG_GET(string/rulesurl))
if(tgui_alert(usr, "This will open the rules in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(config.rulesurl)
src << link(CONFIG_GET(string/rulesurl))
else
to_chat(src, span_danger("The rules URL is not set in the server configuration."))
return
@@ -46,10 +46,10 @@
set desc = "See the map."
set hidden = 1
if(config.mapurl)
if(CONFIG_GET(string/mapurl))
if(tgui_alert(usr, "This will open the map in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(config.mapurl)
src << link(CONFIG_GET(string/mapurl))
else
to_chat(src, span_danger("The map URL is not set in the server configuration."))
return
@@ -59,10 +59,10 @@
set desc = "Visit the GitHub"
set hidden = 1
if(config.githuburl)
if(CONFIG_GET(string/githuburl))
if(tgui_alert(usr, "This will open the GitHub in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(config.githuburl)
src << link(CONFIG_GET(string/githuburl))
else
to_chat(src, span_danger("The GitHub URL is not set in the server configuration."))
return
@@ -72,10 +72,10 @@
set desc = "Visit the discord"
set hidden = 1
if(config.discordurl)
if(CONFIG_GET(string/discordurl))
if(tgui_alert(usr, "This will open the Discord in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(config.discordurl)
src << link(CONFIG_GET(string/discordurl))
else
to_chat(src, span_danger("The Discord URL is not set in the server configuration."))
return
@@ -85,10 +85,10 @@
set desc = "Visit the patreon"
set hidden = 1
if(config.patreonurl)
if(CONFIG_GET(string/patreonurl))
if(tgui_alert(usr, "This will open the Patreon in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(config.patreonurl)
src << link(CONFIG_GET(string/patreonurl))
else
to_chat(src, span_danger("The Patreon URL is not set in the server configuration."))
return