This commit is contained in:
2026-06-19 19:10:36 +09:00
parent f15cd09d13
commit c169418db9
2 changed files with 5 additions and 26 deletions
+4 -5
View File
@@ -254,13 +254,12 @@ function main.ET(source, tier)
local recipe_name = (source.category == 'equipment' and (source.name .. '-mk' .. tier .. '-equipment')) or (source.name .. '-' .. tier) local recipe_name = (source.category == 'equipment' and (source.name .. '-mk' .. tier .. '-equipment')) or (source.name .. '-' .. tier)
if data.raw.technology[source.tech].effects then if not data.raw.technology[source.tech].effects then
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=recipe_name}) data.raw.technology[source.tech].effects = {}
else
data.raw.technology[source.tech].effects = {{type='unlock-recipe', recipe=recipe_name}}
end end
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=recipe_name})
if source.type ~= 'ammo-turret' and source.type ~= 'fluid-turret' then if source.type ~= 'ammo-turret' and source.type ~= 'fluid-turret' then
return return
end end
+1 -21
View File
@@ -231,26 +231,6 @@ function main_recipe(source, tier)
}}) }})
end end
function main_technology(source, tier)
if (source.tech == 'compound-energy') then
table.insert(data.raw.technology['compound-energy-' .. (tier - 1)].effects, {type='unlock-recipe', recipe=source.name .. '-' .. tier})
return
end
if not data.raw.technology[source.tech] then
return
end
local recipe_name = source.name .. '-' .. tier
if data.raw.technology[source.tech].effects then
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=recipe_name})
else
data.raw.technology[source.tech].effects = {{type='unlock-recipe', recipe=recipe_name}}
end
end
-- fast replace group -- fast replace group
function main_replace_group(source) function main_replace_group(source)
if not data.raw[source.type][source.ref_name].fast_replaceable_group then if not data.raw[source.type][source.ref_name].fast_replaceable_group then
@@ -285,7 +265,7 @@ for _, v in pairs(items) do
main_entity(v, j) main_entity(v, j)
main_item(v, j) main_item(v, j)
main_recipe(v, j) main_recipe(v, j)
main_technology(v, j) table.insert(data.raw.technology['compound-energy-' .. (j - 1)].effects, {type='unlock-recipe', recipe=v.name .. '-' .. j})
end end
main_replace_group(v) main_replace_group(v)