-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdata-updates.lua
More file actions
317 lines (260 loc) · 8.35 KB
/
data-updates.lua
File metadata and controls
317 lines (260 loc) · 8.35 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
-- Data updates for other mods
------------------ ALL MODS (Including Factorioplus) ------------------
-- Remove 'object' layer from walls so that shotguns can shoot over them.
local wall_collision_mask_new = {layers={item=true, meltable=true, wall=true, player=true, water_tile=true, is_lower_object=true}}
for k, v in pairs(data.raw["wall"]) do
v.collision_mask = wall_collision_mask_new
end
------------------ INDIVIDUAL MODS ------------------
-- Aircraft
if (mods["Aircraft-space-age"]) then
data.raw["technology"]["jets"].prerequisites = {"gunships", "rocket-fuel", "military-4"}
end
-- AAI-industry
if mods["aai-industry"] then
-- Do glass stuff
switchrecipeingredient("glass","glass-plate")
data.raw["recipe"]["glass"].hidden = true
data.raw["item"]["glass"].hidden = true
table.removetablewithmatchingentry(data.raw["technology"]["glass-processing"].effects,"recipe", "glass")
-- Do sand stuff
switchrecipeingredient("sand","sand-ore")
data.raw["recipe"]["sand"].hidden = true
data.raw["item"]["sand"].hidden = true
end
-- Dectorio
if mods["Dectorio"] then
-- do this
end
-- Flow Control
if mods["Flow Control"] then
-- Place all new pipes into the F+ fluid handling subgroups
if data.raw.item["pipe-junction"] then
data.raw.item["pipe-junction"].subgroup = "pipes"
end
if data.raw.item["pipe-elbow"] then
data.raw.item["pipe-elbow"].subgroup = "pipes"
end
if data.raw.item["pipe-straight"] then
data.raw.item["pipe-straight"].subgroup = "pipes"
end
end
-- FluidMustFlow
if mods["FluidMustFlow"] then
-- Make a subgroup for Fluidmustflow objects in the F+ fluid handling category
data:extend({
{
type = "item-subgroup",
name = "FluidMustFlow",
group = "fluid-handling",
order = "z"
}
})
-- List of FMF items
local fluidMustFlowItems = {
"duct",
"duct-cross",
"duct-curve",
"duct-exhaust",
"duct-intake",
"duct-long",
"duct-small",
"duct-t-junction",
"duct-underground",
"non-return-duct"
}
for _, itemName in pairs(fluidMustFlowItems) do
if data.raw.item[itemName] then
data.raw.item[itemName].subgroup = "FluidMustFlow"
end
end
end
-- Maraxsis
if mods["maraxsis"] then
-- Place the trench-duct pipe into the F+ fluid handling subgroups
if data.raw.item["maraxsis-trench-duct"] then
data.raw.item["maraxsis-trench-duct"].subgroup = "pipes"
end
-- Rename the sand to Quartz Sand
local item_prototype = data.raw["item"][maraxsis_constants.SAND_ITEM_NAME]
if recipe then
item_prototype.localised_name = {"item-name.quartz-sand"}
end
end
-- Pangila
if mods["panglia_planet"] then
-- Swap glass recipes
local recipe_name = "matter_printer"
local recipe = data.raw.recipe[recipe_name]
if recipe then
recipe.ingredients =
{
{type = "item", name = "neural_computer", amount = 1},
{type = "item", name = "electromagnetic-plant", amount = 1},
{type = "item", name = "electronic-circuit", amount = 10},
{type = "item", name = "panglia_panglite", amount = 10},
--{type = "item", name = "glass", amount = 50},
{type = "item", name = "glass-plate", amount = 50}
}
end
end
-- Moshine
if mods["Moshine"] then
-- Swap glass recipes
local recipe_name = "optical-cable"
local recipe = data.raw.recipe[recipe_name]
if recipe then
recipe.ingredients =
{
{type = "item", name = "silicon", amount = 1},
{type = "item", name = "silicon-carbide", amount = 1},
--{type = "item", name = "glass", amount = 1},
{type = "item", name = "glass-plate", amount = 1}
}
end
local recipe_name = "3d-data-storage"
local recipe = data.raw.recipe[recipe_name]
if recipe then
recipe.ingredients =
{
{type = "item", name = "magnet", amount = 3},
{type = "item", name = "silicon-cell", amount = 3},
{type = "item", name = "datacell-empty", amount = 4},
--{type = "item", name = "glass", amount = 5},
{type = "item", name = "glass-plate", amount = 5},
}
end
local recipe_name = "ai-trainer"
local recipe = data.raw.recipe[recipe_name]
if recipe then
recipe.ingredients =
{
{type = "item", name = "model-unstable", amount = 1},
{type = "item", name = "model-stable", amount = 10},
{type = "item", name = "data-processor", amount = 1},
{type = "item", name = "processing-unit", amount = 50},
{type = "item", name = "concrete", amount = 100},
--{type = "item", name = "glass", amount = 100},
{type = "item", name = "glass-plate", amount = 100}
}
end
-- Rename the sand to Quartz Sand
local recipe_name = "maraxsis-sand-extraction"
local recipe = data.raw.recipe[recipe_name]
local item_prototype = data.raw["item"]["sand"]
if recipe then
recipe.localised_name = {"item-name.quartz-sand"}
end
if item_prototype then
-- Overwrites the name defined in the locale
item_prototype.localised_name = {"item-name.quartz-sand"}
end
-- Add a new smelting recipe
data:extend({
{
type = "recipe",
name = "glas-plate-Quartz",
localised_name = {"item-name.glass-plate"},
localised_description = {"item-description.glass-plate"},
category = "smelting",
energy_required = 4,
ingredients = {
{type = "item", name = "sand", amount = 4}
},
results = {{type = "item", name = "glass-plate", amount = 1}},
allow_productivity = true,
enabled = false,
},
-- Change research to FactorioPlus
{
type = "technology",
name = "moshine-tech-glass",
icon = "__Moshine__/graphics/technology/moshine-tech-glass.png",
icon_size = 256,
effects =
{
{
type = "unlock-recipe",
recipe = "glas-plate-Quartz"
},
},
prerequisites = {"planet-discovery-moshine"},
unit =
{
count = 70,
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
},
time = 60
}
},
})
-- Hide the now unsed Item
local item_name = "glass"
local item = data.raw.item[item_name]
local recipe = data.raw.recipe[item_name]
if item then
item.hidden = true
end
if recipe then
recipe.hidden = true
end
end
-- IridescentIndustry
if mods["IridescentIndustry"] then
-- Swap glass recipes
local recipe_name = "iridescent-science-pack"
local recipe = data.raw.recipe[recipe_name]
if recipe then
recipe.ingredients =
{
{type = "item", name = "prismite-refined", amount = 1},
{type = "item", name = "mythril-plate", amount = 1},
-- {type = "item", name = IRIDESCENT.glass, amount = 1}, -- Auskommentiert gelassen
{type = "item", name = "glass-plate", amount = 1},
}
end
local recipe_name = "polychromatic-science-pack"
local recipe = data.raw.recipe[recipe_name]
if recipe then
recipe.ingredients =
{
-- Format: {type = "item", name = "Name des Gegenstands", amount = Menge}
{type = "item", name = "prismite-crystal", amount = 1},
--{type = "item", name = IRIDESCENT.glass, amount = 10},
{type = "item", name = "glass-plate", amount = 10},
{type = "item", name = "prismite-gem-r", amount = 1},
{type = "item", name = "prismite-gem-g", amount = 1},
{type = "item", name = "prismite-gem-b", amount = 1},
}
end
local recipe_name = "s6x-prismite-crystal-glass"
local recipe = data.raw.recipe[recipe_name]
if recipe then
-- Removing obsolete entry fields
recipe.result = nil
recipe.result_count = nil
recipe.main_product = "glass-plate"
-- Defining the new result
recipe.results =
{
{
type = "item",
name = "glass-plate",
amount = 20
}
}
end
local item_name = "glass"
local item = data.raw.item[item_name]
local recipe = data.raw.recipe[item_name]
if item then
item.hidden = true
end
if recipe then
recipe.hidden = true
end
end