-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsettings.lua
113 lines (107 loc) · 2.69 KB
/
settings.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
data:extend({
-- STARTUP SETTINGS
{
type = "bool-setting",
name = "mdrn-use-electricity",
order = "sa",
setting_type = "startup",
default_value = true,
},
{
type = "bool-setting",
name = "mdrn-enable-chute",
order = "sb",
setting_type = "startup",
default_value = true,
},
{
type = "bool-setting",
name = "mdrn-double-recipe",
order = "sd",
setting_type = "startup",
default_value = false,
},
})
-- If the AAI Loaders mod is found, assume the player wants to use the AAI graphics
-- with this mod providing the entities. This can be disabled to allow both mods to provide
-- loaders, but that seems like the non-typical use case.
if mods["aai-loaders"] then
data:extend({
{
type = "bool-setting",
name = "mdrn-use-aai-graphics",
order = "sx",
setting_type = "startup",
default_value = true,
},
})
end
if mods["aai-industry"] then
data:extend({
{
type = "bool-setting",
name = "mdrn-use-aai-recipes",
order = "sy",
setting_type = "startup",
default_value = true,
},
})
end
-- If space-age is enabled we can do belt_stacking
-- TODO: Can stacking be done on 2.0 without the DLC being purchased?
data:extend({
{
type = "string-setting",
name = "mdrn-enable-stacking",
order = "se",
setting_type = "startup",
default_value = "stack-tier",
allowed_values = { "none", "turbo-and-above", "all", "stack-tier" }
},
{
type = "bool-setting",
name = "mdrn-cheap-stacking",
order = "sea",
setting_type = "startup",
default_value = false
},
})
local stacking = data.raw["string-setting"]["mdrn-enable-stacking"]
if not feature_flags.space_travel then
stacking.allowed_values = { "none" }
stacking.default_value = "none"
stacking.hidden = true
local cheap_stack = data.raw["bool-setting"]["mdrn-cheap-stacking"]
cheap_stack.forced_value = false
cheap_stack.hidden = true
-- Mods known to provide a stack inserter
elseif not (mods["space-age"]
or mods["stack-inserters"]
or mods["pycoalprocessing"]) then
stacking.allowed_values = { "none", "all" }
stacking.default_value = "none"
end
-- Settings if 5Dim's New Transport is loaded
if mods["5dim_transport"] then
data:extend({
{
type = "string-setting",
name = "mdrn-keep-5d-loaders",
order = "sg",
setting_type = "startup",
default_value = "none",
allowed_values = {"none", "1x2", "all"}
},
})
if mods["space-age"] then
data:extend({
{
type = "bool-setting",
name = "mdrn-keep-turbo-loader",
order = "sga",
setting_type = "startup",
default_value = false
},
})
end
end