-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModOptions.lua
77 lines (70 loc) · 1.89 KB
/
ModOptions.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
-- Custom Options Definition Table format
-- NOTES:
-- - using an enumerated table lets you specify the options order
--
-- These keywords must be lowercase for LuaParser to read them.
--
-- key: the string used in the script.txt
-- name: the displayed name
-- desc: the description (could be used as a tooltip)
-- type: the option type
-- def: the default value
-- min: minimum value for number options
-- max: maximum value for number options
-- step: quantization step, aligned to the def value
-- maxlen: the maximum string length for string options
-- items: array of item strings for list options
-- scope: 'all', 'player', 'team', 'allyteam' <<< not supported yet >>>
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- Example ModOptions.lua
--
local options = {
{
key="magnetonics",
name="Options",
desc="Options",
type="section",
},
{
key="startoptions",
name="Game Modes",
desc="Change the game mode",
type="list",
def="normal",
section="magnetonics",
items={
{key="normal", name="Normal", desc="Normal game mode"},
{
key = 'koth',
name = 'King of the Hill',
desc = 'Control the hill for a set amount of time to win! See King of the Hill section.',
},
}
},
{
key='hilltime',
name='Hill control time',
desc='Set how long a team has to control the hill for (in minutes).',
type='number',
def=3,
min=1,
max=30,
step=1.0,
section='magnetonics',
},
{
key='gracetime',
name='No control grace period',
desc='No player can control the hill until period is over.',
type="number",
def=0,
min=0,
max=5,
step=0.5,
section="magnetonics",
},
}
return options