-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.lua
More file actions
34 lines (32 loc) · 1007 Bytes
/
settings.lua
File metadata and controls
34 lines (32 loc) · 1007 Bytes
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
local default_threshold_settings = {
overflow = 80,
top_up = 50,
}
-- This still uses my old way of defining valve types to maintain
-- player's previous settings.
for _, my_valve_type in pairs({"overflow", "top_up"}) do
local default_value = default_threshold_settings[my_valve_type]
assert(default_value, "unexpected condition for valve type "..my_valve_type)
local setting_name = "valves-default-threshold-"..my_valve_type
data:extend({
{
type = "int-setting",
name = setting_name,
setting_type = "startup",
order = "a["..setting_name.."]",
minimum_value = 0,
maximum_value = 100,
default_value = default_value,
},
})
end
data:extend({
{
type = "bool-setting",
name = "valves-disable-py-migration",
setting_type = "startup",
order = "z[migration]-a[py]",
default_value = false,
hidden = mods["pyindustry"] == nil
},
})