This commit is contained in:
2026-06-19 23:19:46 +09:00
parent 7f272cd0b7
commit 765e5da28e
2 changed files with 6 additions and 23 deletions
+2 -15
View File
@@ -220,17 +220,6 @@ end
-- recipe
function main.ER(source, tier)
local result_name = source.name .. ((source.category == 'equipment' and ('-mk' .. tier .. '-equipment')) or ('-' .. tier))
local ingredients = {}
local ingredient_name
if source.category == 'equipment' then
ingredient_name = (tier == source.min and source.ref_name) or (source.name .. '-mk' .. (tier - 1) .. '-equipment')
else
ingredient_name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name
end
table.insert(ingredients, {type = 'item', name = ingredient_name, amount = 2})
data:extend({{
type = 'recipe',
@@ -238,7 +227,7 @@ function main.ER(source, tier)
icons = table.deepcopy(data.raw.item[source.ref_name].icons),
energy_required = 2,
enabled = false,
ingredients = ingredients,
ingredients = {{type = 'item', name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name, amount = 2}},
results = {{type = 'item', name = result_name, amount = 1}},
main_product = result_name,
localised_name = {'?', data.raw[source.type][result_name].localised_name, ''},
@@ -252,13 +241,11 @@ function main.ET(source, tier)
return
end
local recipe_name = (source.category == 'equipment' and (source.name .. '-mk' .. tier .. '-equipment')) or (source.name .. '-' .. tier)
if not data.raw.technology[source.tech].effects then
data.raw.technology[source.tech].effects = {}
end
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=recipe_name})
table.insert(data.raw.technology[source.tech].effects, {type = 'unlock-recipe', recipe = source.name .. '-' .. tier})
if source.type ~= 'ammo-turret' and source.type ~= 'fluid-turret' then
return