forked from tgstation/TerraGov-Marine-Corps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.dm
93 lines (64 loc) · 2.6 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
93
//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()
set name = "wiki"
set hidden = TRUE
if(!CONFIG_GET(string/wikiurl))
to_chat(src, "<span class='warning'>The wiki URL is not set in the server configuration.</span>")
return
if(alert("This will open the wiki in your browser. Are you sure?", "Wiki", "Yes", "No") != "Yes")
return
DIRECT_OUTPUT(src, link(CONFIG_GET(string/wikiurl)))
/client/verb/forum()
set name = "forum"
set hidden = TRUE
if(!CONFIG_GET(string/forumurl))
to_chat(src, "<span class='warning'>The forum URL is not set in the server configuration.</span>")
return
if(alert("This will open the forum in your browser. Are you sure?", "Forum", "Yes", "No") != "Yes")
return
DIRECT_OUTPUT(src, link(CONFIG_GET(string/forumurl)))
/client/verb/rules()
set name = "rules"
set hidden = TRUE
if(!CONFIG_GET(string/rulesurl))
to_chat(src, "<span class='warning'>The rules URL is not set in the server configuration.</span>")
return
if(alert("This will open the rules in your browser. Are you sure?", "Rules", "Yes", "No") != "Yes")
return
DIRECT_OUTPUT(src, link(CONFIG_GET(string/rulesurl)))
/client/verb/discord()
set name = "discord"
set hidden = TRUE
if(!CONFIG_GET(string/discordurl))
to_chat(src, "<span class='warning'>The Discord URL is not set in the server configuration.</span>")
return
if(alert("This will open our Discord in your browser. Are you sure?", "Discord", "Yes", "No") != "Yes")
return
DIRECT_OUTPUT(src, link(CONFIG_GET(string/discordurl)))
/client/verb/github()
set name = "github"
set hidden = TRUE
if(!CONFIG_GET(string/githuburl))
to_chat(src, "<span class='warning'>The bug tracker URL is not set in the server configuration.</span>")
return
if(alert("This will open our bug tracker page in your browser. Are you sure?", "Github", "Yes", "No") != "Yes")
return
DIRECT_OUTPUT(src, link(CONFIG_GET(string/githuburl)))
/client/verb/webmap()
set name = "webmap"
set hidden = TRUE
var/webmap_host = CONFIG_GET(string/webmap_host)
if(!webmap_host)
to_chat(src, "<span class='warning'>Webmaps are not setup.</span>")
return
var/map_url
var/choice = alert("Do you want to view the ground or the ship?",,"Ship","Ground","Cancel")
switch(choice)
if("Ship")
map_url = SSmapping.configs[SHIP_MAP].map_file
if("Ground")
map_url = SSmapping.configs[GROUND_MAP].map_file
if(!map_url)
to_chat(src, "<span class='warning'>Mapping subsystem hasn't finished loading yet, try again later.</span>")
return
DIRECT_OUTPUT(src, link("[webmap_host][map_url]"))