Configuration datum refactor

This commit is contained in:
Jordan Brown
2017-09-28 22:36:51 -04:00
committed by CitadelStationBot
parent d25894447e
commit e5ef3d2405
138 changed files with 5936 additions and 571 deletions
+16 -11
View File
@@ -3,12 +3,13 @@
set name = "wiki"
set desc = "Type what you want to know about. This will open the wiki in your web browser. Type nothing to go to the main page."
set hidden = 1
if(config.wikiurl)
var/wikiurl = CONFIG_GET(string/wikiurl)
if(wikiurl)
if(query)
var/output = config.wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
var/output = wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
src << link(output)
else if (query != null)
src << link(config.wikiurl)
src << link(wikiurl)
else
to_chat(src, "<span class='danger'>The wiki URL is not set in the server configuration.</span>")
return
@@ -17,10 +18,11 @@
set name = "forum"
set desc = "Visit the forum."
set hidden = 1
if(config.forumurl)
var/forumurl = CONFIG_GET(string/forumurl)
if(forumurl)
if(alert("This will open the forum in your browser. Are you sure?",,"Yes","No")=="No")
return
src << link(config.forumurl)
src << link(forumurl)
else
to_chat(src, "<span class='danger'>The forum URL is not set in the server configuration.</span>")
return
@@ -29,10 +31,11 @@
set name = "rules"
set desc = "Show Server Rules."
set hidden = 1
if(config.rulesurl)
var/rulesurl = CONFIG_GET(string/rulesurl)
if(rulesurl)
if(alert("This will open the rules in your browser. Are you sure?",,"Yes","No")=="No")
return
src << link(config.rulesurl)
src << link(rulesurl)
else
to_chat(src, "<span class='danger'>The rules URL is not set in the server configuration.</span>")
return
@@ -41,10 +44,11 @@
set name = "github"
set desc = "Visit Github"
set hidden = 1
if(config.githuburl)
var/githuburl = CONFIG_GET(string/githuburl)
if(githuburl)
if(alert("This will open the Github repository in your browser. Are you sure?",,"Yes","No")=="No")
return
src << link(config.githuburl)
src << link(githuburl)
else
to_chat(src, "<span class='danger'>The Github URL is not set in the server configuration.</span>")
return
@@ -53,14 +57,15 @@
set name = "report-issue"
set desc = "Report an issue"
set hidden = 1
if(config.githuburl)
var/githuburl = CONFIG_GET(string/githuburl)
if(githuburl)
var/message = "This will open the Github issue reporter in your browser. Are you sure?"
if(GLOB.revdata.testmerge.len)
message += "<br>The following experimental changes are active and are probably the cause of any new or sudden issues you may experience. If possible, please try to find a specific thread for your issue instead of posting to the general issue tracker:<br>"
message += GLOB.revdata.GetTestMergeInfo(FALSE)
if(tgalert(src, message, "Report Issue","Yes","No")=="No")
return
src << link("[config.githuburl]/issues/new")
src << link("[githuburl]/issues/new")
else
to_chat(src, "<span class='danger'>The Github URL is not set in the server configuration.</span>")
return