This commit is contained in:
2024-06-18 18:31:44 +09:00
parent 898a507423
commit 48be75e5e2

View File

@@ -374,33 +374,15 @@ function main.EL(source)
data.raw[source.type][source.ref_name].fast_replaceable_group = source.ref_name data.raw[source.type][source.ref_name].fast_replaceable_group = source.ref_name
end end
local min = source.min if source.max > 2 then
local max = source.max data.raw[source.type][source.name .. '-' .. 2].fast_replaceable_group = data.raw[source.type][source.ref_name].fast_replaceable_group
if (max - min) < 1 then
return
elseif ((max - min) > 0) and (min > 1) then
min = 2
end end
local base_type = source.type if source.max > source.min then
local base_name = source.ref_name .. '-' for j=source.min + 1, source.max do
local new_type = source.type data.raw[source.type][source.name .. '-' .. j].fast_replaceable_group = data.raw[source.type][source.name .. '-' .. (j - 1)].fast_replaceable_group
local new_name = source.name .. '-'
for j=min, max, 1 do
if (source.name == 'electric-filter-furnace') and (j == 2) then
if j == 2 then
base_type = 'furnace'
else
base_type = source.type
end end
end end
data.raw[base_type][base_name .. (j - 1)].fast_replaceable_group = data.raw[new_type][new_name .. j].fast_replaceable_group
end
end end
return main return main