From 632d913e8b1bcbe7e4de435c8b99d09690c2b035 Mon Sep 17 00:00:00 2001 From: Kyep <16434066+Kyep@users.noreply.github.com> Date: Thu, 15 Oct 2020 13:52:18 +0000 Subject: [PATCH] Tweaks Wiki Button (#14613) * wiki link * spacing Co-authored-by: Kyep --- code/controllers/subsystem/changelog.dm | 2 +- interface/interface.dm | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/code/controllers/subsystem/changelog.dm b/code/controllers/subsystem/changelog.dm index eef8ee6da62..0dc3bec8cd1 100644 --- a/code/controllers/subsystem/changelog.dm +++ b/code/controllers/subsystem/changelog.dm @@ -245,7 +245,7 @@ SUBSYSTEM_DEF(changelog) if(config.wikiurl) if(alert("This will open the wiki in your browser. Are you sure?",,"Yes","No")=="No") return - usr.client.wiki("") // Blank arg is important here + usr.client.wiki() else to_chat(usr, "The Wiki URL is not set in the server configuration. Please inform the server host.") diff --git a/interface/interface.dm b/interface/interface.dm index 9a544fe7951..2b2f41e06f3 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -1,13 +1,10 @@ //Please use mob or src (not usr) in these procs. This way they can be called in the same fashion as procs. -/client/verb/wiki(query as text) +/client/verb/wiki() set name = "wiki" set desc = "Type what you want to know about. This will open the wiki in your web browser." set hidden = 1 if(config.wikiurl) - if(query) - var/output = config.wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query - src << link(output) - else + if(alert("Open the wiki in your browser?", null, "Yes", "No") == "Yes") src << link(config.wikiurl) else to_chat(src, "The wiki URL is not set in the server configuration.") @@ -18,7 +15,7 @@ set desc = "Visit the forum." set hidden = 1 if(config.forumurl) - if(alert("Open the forum in your browser?",,"Yes","No")=="Yes") + if(alert("Open the forum in your browser?", null, "Yes", "No") == "Yes") if(config.forum_link_url && prefs && !prefs.fuid) link_forum_account() src << link(config.forumurl) @@ -30,7 +27,7 @@ set desc = "View the server rules." set hidden = 1 if(config.rulesurl) - if(alert("This will open the rules in your browser. Are you sure?",,"Yes","No")=="No") + if(alert("This will open the rules in your browser. Are you sure?", null, "Yes", "No") == "No") return src << link(config.rulesurl) else @@ -41,7 +38,7 @@ set desc = "Visit the GitHub page." set hidden = 1 if(config.githuburl) - if(alert("This will open our GitHub repository in your browser. Are you sure?",,"Yes","No")=="No") + if(alert("This will open our GitHub repository in your browser. Are you sure?", null, "Yes", "No") == "No") return src << link(config.githuburl) else @@ -58,7 +55,7 @@ if(!durl) to_chat(src, "The Discord URL is not set in the server configuration.") return - if(alert("This will invite you to our Discord server. Are you sure?",,"Yes","No")=="No") + if(alert("This will invite you to our Discord server. Are you sure?", null, "Yes", "No") == "No") return src << link(durl) @@ -67,7 +64,7 @@ set desc = "Donate to help with hosting costs." set hidden = 1 if(config.donationsurl) - if(alert("This will open the donation page in your browser. Are you sure?",,"Yes","No")=="No") + if(alert("This will open the donation page in your browser. Are you sure?", null, "Yes", "No") == "No") return src << link(config.donationsurl) else