z_mirror/BottleneckLite

git clone https://git.raiguard.me/z_mirror/BottleneckLite

Caleb HeuerAdd indicator style setting, update to flib 0.12a5db321

new-style
1.3 KiB56 linesraw
1local constants = require("__BottleneckLite__/constants")
2
3data:extend({
4  {
5    type = "bool-setting",
6    name = "bnl-enable",
7    setting_type = "startup",
8    default_value = true,
9    order = "aa",
10  },
11  {
12    type = "bool-setting",
13    name = "bnl-glow",
14    setting_type = "startup",
15    default_value = true,
16    order = "ab",
17  },
18  {
19    type = "bool-setting",
20    name = "bnl-include-mining-drills",
21    setting_type = "startup",
22    default_value = true,
23    order = "ac",
24  },
25  {
26    type = "string-setting",
27    name = "bnl-indicator-style",
28    setting_type = "startup",
29    default_value = "default",
30    allowed_values = { "default", "solid" },
31    order = "ba",
32  },
33  {
34    type = "string-setting",
35    name = "bnl-indicator-size",
36    setting_type = "startup",
37    default_value = constants.default_size,
38    allowed_values = constants.size_settings,
39    order = "bb",
40  },
41})
42
43local color_settings = {}
44for name, spec in pairs(constants.status_settings) do
45  color_settings[#color_settings + 1] = {
46    type = "string-setting",
47    name = "bnl-color-" .. name,
48    localised_name = { "mod-setting-name.bnl-color-setting", { "mod-setting-name.bnl-status-" .. name } },
49    setting_type = "startup",
50    default_value = spec.color,
51    allowed_values = constants.color_settings,
52    order = spec.order,
53  }
54end
55
56data:extend(color_settings)