-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodinfo.lua
More file actions
131 lines (111 loc) · 3.21 KB
/
modinfo.lua
File metadata and controls
131 lines (111 loc) · 3.21 KB
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
name = "Pickup Filter"
description = "Filter items you pickup by pressing a key!"
icon_atlas = "modicon.xml"
icon = "modicon.tex"
author = "Boas"
version = "1.0.7"
forumthread = ""
dont_starve_compatible = false
reign_of_giants_compatible = false
dst_compatible = true
all_clients_require_mod = false
client_only_mod = true
api_version = 10
local function AddConfigOption(desc, data, hover)
return {description = desc, data = data, hover = hover}
end
local function AddConfig(label, name, options, default, hover)
return {
label = label,
name = name,
options = options,
default = default,
hover = hover
}
end
local function AddSectionTitle(title)
return AddConfig(title, "", {{description = "", data = 0}}, 0)
end
local function GetKeyboardOptions()
local keys = {}
local function AddConfigKey(t, key)
t[#t + 1] = AddConfigOption(key, "KEY_" .. key)
end
local function AddDisabledConfigOption(t)
t[#t + 1] = AddConfigOption("Disabled", false)
end
AddDisabledConfigOption(keys)
local alphabet = {
"A","B","C","D","E","F","G","H","I","J","K","L","M",
"N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
}
for i = 1, 26 do
AddConfigKey(keys, alphabet[i])
end
for i = 1, 12 do
AddConfigKey(keys, "F" .. i)
end
AddDisabledConfigOption(keys)
return keys
end
local function GetToggleOptions()
return {
AddConfigOption("Disabled", false),
AddConfigOption("Enabled", true)
}
end
local KeyboardOptions = GetKeyboardOptions()
local ToggleOptions = GetToggleOptions()
local AssignKeyMessage = "Assign a key"
configuration_options =
{
AddSectionTitle("Pickup Filter Keybinds"),
AddConfig(
"Filter Item",
"FILTER_ITEM_KEY",
KeyboardOptions,
"KEY_F1",
AssignKeyMessage
),
AddConfig(
"Toggle Pickup Filter",
"TOGGLE_PICKUP_FILTER_KEY",
KeyboardOptions,
"KEY_F2",
AssignKeyMessage
),
AddSectionTitle("Advanced Settings"),
AddConfig(
"Allow Mouse Pickup",
"ALLOW_MOUSE_PICKUP_THROUGH_FILTER_BOOL",
ToggleOptions,
false,
"Allows mouse clicks to bypass the pickup filter"
),
AddConfig(
"Remove Interactions",
"REMOVE_INTERACTIONS_FROM_FILTERED_BOOL",
ToggleOptions,
false,
"Prevents all interactions, including examine, with items that are currently filtered."
),
AddConfig(
"Red Tint",
"RED_TINT_ENABLED_BOOL",
ToggleOptions,
true,
"Enable red highlight for filtered items.\nItems are still filtered even if highlighting is disabled."
),
AddSectionTitle("Save Settings"),
AddConfig(
"Remember Filtered Targets",
"PERSISTENCE_MODE",
{
AddConfigOption("Don't save", "disabled", "Never remember your filtered targets."),
AddConfigOption("Save for all games", "game", "Remember filtered targets in every world."),
AddConfigOption("Save per world", "world", "Each world remembers its own filtered targets."),
},
"game",
"Choose how your filter is remembered"
),
}