-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata-final-fixes.lua
More file actions
32 lines (29 loc) · 1003 Bytes
/
data-final-fixes.lua
File metadata and controls
32 lines (29 loc) · 1003 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
local holders = {
"assembling-machine",
"mining-drill",
"furnace",
"beacon",
"biochamber",
"foundry"
}
local function table_contains(tbl, val)
for _, v in pairs(tbl) do
if v == val then return true end
end
return false
end
for _, holder_type in pairs(holders) do
for _, entity in pairs(data.raw[holder_type] or {}) do
if entity.module_specification then
entity.module_specification.module_categories = entity.module_specification.module_categories or {}
if not table_contains(entity.module_specification.module_categories, "omega-module") then
table.insert(entity.module_specification.module_categories, "omega-module")
end
end
if entity.allowed_module_categories then
if not table_contains(entity.allowed_module_categories, "omega-module") then
table.insert(entity.allowed_module_categories, "omega-module")
end
end
end
end