forked from cmss13-devs/cmss13
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.dm
91 lines (79 loc) · 2.81 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
//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 desc = "Visit the wiki."
set hidden = TRUE
if( CONFIG_GET(string/wikiurl) )
if(tgui_alert(src, "This will open the wiki in your browser. Are you sure?", "Confirm", list("Yes", "No")) != "Yes")
return
src << link(CONFIG_GET(string/wikiurl))
else
to_chat(src, SPAN_DANGER("The wiki URL is not set in the server configuration."))
return
/client/verb/forum()
set name = "forum"
set desc = "Visit the forum."
set hidden = TRUE
if( CONFIG_GET(string/forumurl) )
if(tgui_alert(src, "This will open the forum in your browser. Are you sure?", "Confirm", list("Yes", "No")) != "Yes")
return
src << link(CONFIG_GET(string/forumurl))
else
to_chat(src, SPAN_DANGER("The forum URL is not set in the server configuration."))
return
/client/verb/rules()
set name = "rules"
set desc = "Read our rules."
set hidden = TRUE
if( CONFIG_GET(string/rulesurl) )
if(tgui_alert(src, "This will open the rules in your browser. Are you sure?", "Confirm", list("Yes", "No")) != "Yes")
return
src << link(CONFIG_GET(string/rulesurl))
else
to_chat(src, SPAN_DANGER("The rules URL is not set in the server configuration."))
return
/client/verb/changelog()
set name = "Changelog"
set category = "OOC"
if(!GLOB.changelog_tgui)
GLOB.changelog_tgui = new /datum/changelog()
GLOB.changelog_tgui.tgui_interact(mob)
if(prefs.lastchangelog != GLOB.changelog_hash)
prefs.lastchangelog = GLOB.changelog_hash
prefs.save_preferences()
winset(src, "infowindow.changelog", "font-style=;")
/client/verb/discord()
set name = "Discord"
set desc = "Join our Discord! Meet and talk with other players in the server."
set hidden = TRUE
if(tgui_alert(src, "This will open the discord in your browser. Are you sure?", "Confirm", list("Yes", "No")) != "Yes")
return
src << link("[CONFIG_GET(string/discordurl)]")
return
/client/verb/submitbug()
set name = "Submit Bug"
set desc = "Submit a bug."
set hidden = TRUE
if(!usr)
return
var/datum/tgui_bug_report_form/report = new(usr)
report.tgui_interact(usr)
return
/client/verb/set_fps()
set name = "Set FPS"
set desc = "Set client FPS. 20 is the default"
set category = "Preferences"
var/fps = tgui_input_number(usr,"New FPS Value. 0 is server-sync. Higher values cause more desync.","Set FPS", 0, MAX_FPS, MIN_FPS)
if(world.byond_version >= 511 && byond_version >= 511 && fps >= MIN_FPS && fps <= MAX_FPS)
vars["fps"] = fps
prefs.fps = fps
prefs.save_preferences()
return
/client/verb/edit_hotkeys()
set name = "Edit Hotkeys"
set category = "Preferences"
prefs.macros.tgui_interact(usr)
/client/var/client_keysend_amount = 0
/client/var/next_keysend_reset = 0
/client/var/next_keysend_trip_reset = 0
/client/var/keysend_tripped = FALSE