mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -83,6 +83,23 @@ local function ET(source, tier)
|
||||
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=source.name .. '-' .. tier})
|
||||
end
|
||||
|
||||
-- fast replace group
|
||||
local function EL(source)
|
||||
if not data.raw[source.type][source.ref_name].fast_replaceable_group then
|
||||
data.raw[source.type][source.ref_name].fast_replaceable_group = source.type
|
||||
end
|
||||
|
||||
if source.max > 2 then
|
||||
data.raw[source.type][source.name .. '-' .. 2].fast_replaceable_group = data.raw[source.type][source.ref_name].fast_replaceable_group
|
||||
end
|
||||
|
||||
if source.max > source.min then
|
||||
for j=source.min + 1, source.max do
|
||||
data.raw[source.type][source.name .. '-' .. j].fast_replaceable_group = data.raw[source.type][source.name .. '-' .. (j - 1)].fast_replaceable_group
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in pairs(items['setting']) do
|
||||
for k2=1, #v.effect do
|
||||
if items[v.effect[k2]] ~= nil then
|
||||
@@ -105,6 +122,8 @@ for k, v in pairs(items) do
|
||||
ER(v, j)
|
||||
ET(v, j)
|
||||
end
|
||||
|
||||
EL(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user