-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodinfo.lua
186 lines (177 loc) · 5.33 KB
/
modinfo.lua
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name = "Environment Pinger"
description = "Ping various objects in the environment. See others' ping objects."
author = "sauktux"
version = "1.0.10".."v"
forumthread = ""
icon_atlas = "modicon.xml"
icon = "modicon.tex"
client_only_mod = true
all_clients_require_mod = false
server_only_mod = false
dont_starve_compatible = false
reign_of_giants_compatible = false
dst_compatible = true
api_version = 10
local function AddOption(name,label,hover,options,default)
return {
name = name,
label = label,
hover = hover,
options = options,
default = default,
}
end
local function FormatOption(description,data,hover)
return {description = description, data = data, hover = hover}
end
local function AddEmptySeperator(seperator)
return AddOption("" , seperator , "" , FormatOption("",0) , 0)
end
local keys_opt = {
FormatOption("None--",0),
FormatOption("A",97),
FormatOption("B",98),
FormatOption("C",99),
FormatOption("D",100),
FormatOption("E",101),
FormatOption("F",102),
FormatOption("G",103),
FormatOption("H",104),
FormatOption("I",105),
FormatOption("J",106),
FormatOption("K",107),
FormatOption("L",108),
FormatOption("M",109),
FormatOption("N",110),
FormatOption("O",111),
FormatOption("P",112),
FormatOption("Q",113),
FormatOption("R",114),
FormatOption("S",115),
FormatOption("T",116),
FormatOption("U",117),
FormatOption("V",118),
FormatOption("W",119),
FormatOption("X",120),
FormatOption("Y",121),
FormatOption("Z",122),
FormatOption("--None--",0),
FormatOption("Period",46),
FormatOption("Slash",47),
FormatOption("Semicolon",59),
FormatOption("LeftBracket",91),
FormatOption("RightBracket",93),
FormatOption("F1",282),
FormatOption("F2",283),
FormatOption("F3",284),
FormatOption("F4",285),
FormatOption("F5",286),
FormatOption("F6",287),
FormatOption("F7",288),
FormatOption("F8",289),
FormatOption("F9",290),
FormatOption("F10",291),
FormatOption("F11",292),
FormatOption("F12",293),
FormatOption("Up",273),
FormatOption("Down",274),
FormatOption("Right",275),
FormatOption("Left",276),
FormatOption("PageUp",280),
FormatOption("PageDown",281),
FormatOption("Home",278),
FormatOption("Insert",277),
FormatOption("Delete",127),
FormatOption("End",279),
FormatOption("--None",0),
}
local bool_opt = {
FormatOption("Disabled",false),
FormatOption("Enabled",true),
}
local special_buttons = {
FormatOption("None--",0),
FormatOption("RShift",303),
FormatOption("LShift",304),
FormatOption("LCtrl",306),
FormatOption("RCtrl",305),
FormatOption("RAlt",307),
FormatOption("LAlt",308),
FormatOption("--None",0),
}
local keys_and_special = {
FormatOption("None--",0),
FormatOption("A",97),
FormatOption("B",98),
FormatOption("C",99),
FormatOption("D",100),
FormatOption("E",101),
FormatOption("F",102),
FormatOption("G",103),
FormatOption("H",104),
FormatOption("I",105),
FormatOption("J",106),
FormatOption("K",107),
FormatOption("L",108),
FormatOption("M",109),
FormatOption("N",110),
FormatOption("O",111),
FormatOption("P",112),
FormatOption("Q",113),
FormatOption("R",114),
FormatOption("S",115),
FormatOption("T",116),
FormatOption("U",117),
FormatOption("V",118),
FormatOption("W",119),
FormatOption("X",120),
FormatOption("Y",121),
FormatOption("Z",122),
FormatOption("--None--",0),
FormatOption("Period",46),
FormatOption("Slash",47),
FormatOption("Semicolon",59),
FormatOption("LeftBracket",91),
FormatOption("RightBracket",93),
FormatOption("F1",282),
FormatOption("F2",283),
FormatOption("F3",284),
FormatOption("F4",285),
FormatOption("F5",286),
FormatOption("F6",287),
FormatOption("F7",288),
FormatOption("F8",289),
FormatOption("F9",290),
FormatOption("F10",291),
FormatOption("F11",292),
FormatOption("F12",293),
FormatOption("--None--",0),
FormatOption("Up",273),
FormatOption("Down",274),
FormatOption("Right",275),
FormatOption("Left",276),
FormatOption("PageUp",280),
FormatOption("PageDown",281),
FormatOption("Home",278),
FormatOption("Insert",277),
FormatOption("Delete",127),
FormatOption("End",279),
FormatOption("RShift",303),
FormatOption("LShift",304),
FormatOption("LCtrl",306),
FormatOption("RCtrl",305),
FormatOption("RAlt",307),
FormatOption("LAlt",308),
FormatOption("--None",0), -- Presumably, if you're setting this to none, then you only want to "receive" pings.
}
local ping_times = {}
for i = 10,60,5 do
ping_times[(i-5)/5] = FormatOption(i.."s",i)
end
configuration_options = {
AddOption("ping_key","Ping Hold Key","The key that needs to be held to be able to ping.",keys_and_special,118),
AddOption("whisper_key","Whisper Key","Hold this key to make your ping be whispered.",special_buttons,306),
AddOption("pingsound","Ping Sound","Should a flare sound be played whenever a ping appears?",bool_opt,true),
AddOption("pingtime","Ping Time","How long should the pings last locally?",ping_times,20),
AddOption("encryptdata","Encrypt Data","Should the data part of the message be encrypted?",bool_opt,false),
}