mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -374,32 +374,14 @@ 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
|
||||||
|
|
||||||
data.raw[base_type][base_name .. (j - 1)].fast_replaceable_group = data.raw[new_type][new_name .. j].fast_replaceable_group
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user