forked from Sandstorm-Station/Sandstorm-Station-13
-
-
Notifications
You must be signed in to change notification settings - Fork 283
/
Copy pathinterface.dm
92 lines (86 loc) · 3.54 KB
/
interface.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//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)
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
var/wikiurl = CONFIG_GET(string/wikiurl)
var/wikiurltg = CONFIG_GET(string/wikiurltg)
if(wikiurl)
if(query)
var/output = wikiurl + "?search=" + query
src << link(output)
output = wikiurltg + "/index.php?title=Special%3ASearch&profile=default&search=" + query
src << link(output)
else if (query != null)
src << link(wikiurltg)
src << link(wikiurl)
else
to_chat(src, "<span class='danger'>The wiki URL is not set in the server configuration.</span>")
return
/client/verb/discord()
set name = "discord"
set desc = "Join the discord."
set hidden = 1
var/discordurl = CONFIG_GET(string/discordurl)
if(discordurl)
if(alert(src, "This will open the discord invite in your browser. Are you sure?",,"Yes","No")!="Yes")
return
src << link(discordurl)
else
to_chat(src, "<span class='danger'>The discord invite URL is not set in the server configuration.</span>")
return
/client/verb/rules()
set name = "rules"
set desc = "Show Server Rules."
set hidden = 1
var/rulesurl = CONFIG_GET(string/rulesurl)
if(rulesurl)
if(alert("This will open the rules in your browser. Are you sure?",,"Yes","No")!="Yes")
return
src << link(rulesurl)
else
to_chat(src, "<span class='danger'>The rules URL is not set in the server configuration.</span>")
return
/client/verb/github()
set name = "github"
set desc = "Visit Github"
set hidden = 1
var/githuburl = CONFIG_GET(string/githuburl)
if(githuburl)
if(alert("This will open the Github repository in your browser. Are you sure?",,"Yes","No")!="Yes")
return
src << link(githuburl)
else
to_chat(src, "<span class='danger'>The Github URL is not set in the server configuration.</span>")
return
/client/verb/reportissue()
set name = "report-issue"
set desc = "Report an issue"
set hidden = 1
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")!="Yes")
return
var/static/issue_template = file2text(".github/ISSUE_TEMPLATE.md")
var/servername = CONFIG_GET(string/servername)
var/url_params = "Reporting client version: [byond_version].[byond_build]\n\n[issue_template]"
if(GLOB.round_id || servername)
url_params = "Issue reported from [GLOB.round_id ? " Round ID: [GLOB.round_id][servername ? " ([servername])" : ""]" : servername]\n\n[url_params]"
DIRECT_OUTPUT(src, link("[githuburl]/issues/new?body=[url_encode(url_params)]"))
else
to_chat(src, "<span class='danger'>The Github URL is not set in the server configuration.</span>")
return
/client/verb/changelog()
set name = "Changelog"
set category = "OOC"
if(!GLOB.changelog_tgui)
GLOB.changelog_tgui = new /datum/changelog()
GLOB.changelog_tgui.ui_interact(mob)
if(prefs.lastchangelog != GLOB.changelog_hash)
prefs.lastchangelog = GLOB.changelog_hash
prefs.save_preferences()
winset(src, "infowindow.changelog", "font-style=;")