This commit is contained in:
2024-06-17 01:53:55 +09:00
parent 1668dd4eb0
commit 4b858a4bfb
8 changed files with 349 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ for _, force in pairs(game.forces) do
for _, v in pairs(items['item']) do
if v.enabled then
if (v.type == 'solar-panel') or (v.type == 'accumulator') or (v.type == 'boiler') or (v.type == 'steam-engine') or (v.type == 'nuclear-reactor') or (v.type == 'heat-pipe') or (v.type == 'heat-exchanger') or (v.type == 'steam-turbine') then
if (v.tech == 'compound-energy') then
for j=v.min, v.max, 1 do
if technologies['compound-energy-' .. j] ~= nil then
if technologies['compound-energy-' .. j].researched then
@@ -17,6 +17,7 @@ for _, force in pairs(game.forces) do
end
end
end
else
if technologies[v.tech] then
if technologies[v.tech].researched then
@@ -26,6 +27,20 @@ for _, force in pairs(game.forces) do
recipes[v.name .. '-' .. j].reload()
end
end
if v.type == 'ammo-turret' or v.type == 'fluid-turret' then
for i=1, #items['research_modifier'][v.type], 1 do
for j=1, #data.raw.technology[items['research_modifier'][v.type][i]].effects, 1 do
if (data.raw.technology[items['research_modifier'][v.type][i]].effects[j].type == 'turret-attack') then
if (data.raw.technology[items['research_modifier'][v.type][i]].effects[j].turret_id == v.ref_name) then
for j=v.min, v.max, 1 do
table.insert(data.raw.technology[items['research_modifier'][v.type][i]].effects, {type='turret-attack', turret_id=v.name .. '-' .. j, modifier=data.raw.technology[items['research_modifier'][v.type][i]].effects[j].modifier})
end
end
end
end
end
end
end
end
end