mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -356,7 +356,7 @@ local items = {
|
|||||||
graphics_name = 'solar-panel-equipment'
|
graphics_name = 'solar-panel-equipment'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
['item-productivity'] = {
|
['item_productivity'] = {
|
||||||
['solar-panel'] = 'solar-energy',
|
['solar-panel'] = 'solar-energy',
|
||||||
['accumulator'] = 'electric-energy-accumulators',
|
['accumulator'] = 'electric-energy-accumulators',
|
||||||
['landfill'] = 'landfill',
|
['landfill'] = 'landfill',
|
||||||
|
|||||||
@@ -334,33 +334,29 @@ if settings.startup['PHI-MI'].value then
|
|||||||
end
|
end
|
||||||
|
|
||||||
if settings.startup['PHI-MI-PRODUCTIVITY'].value then
|
if settings.startup['PHI-MI-PRODUCTIVITY'].value then
|
||||||
local function add_prod_tech(name, tech)
|
for k, v in pairs(items.item_productivity) do
|
||||||
|
if data.raw.technology[v] then
|
||||||
data:extend({{
|
data:extend({{
|
||||||
type = 'technology',
|
type = 'technology',
|
||||||
name = name .. '-productivity',
|
name = k .. '-productivity',
|
||||||
prerequisites = tech,
|
prerequisites = tech,
|
||||||
effects = {
|
effects = {
|
||||||
{
|
{
|
||||||
type = 'change-recipe-productivity',
|
type = 'change-recipe-productivity',
|
||||||
recipe = name,
|
recipe = k,
|
||||||
change = 0.1
|
change = 0.1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
unit = {
|
unit = {
|
||||||
count_formula = '(1.5^L)*1000',
|
count_formula = '(1.5^L)*1000',
|
||||||
ingredients = table.deepcopy(data.raw.technology[tech].unit.ingredients),
|
ingredients = table.deepcopy(data.raw.technology[v].unit.ingredients),
|
||||||
time = data.raw.technology[tech].unit.time
|
time = data.raw.technology[v].unit.time
|
||||||
},
|
},
|
||||||
icon = data.raw.technology[tech].icon,
|
icon = data.raw.technology[v].icon,
|
||||||
max_level = 'infinite',
|
max_level = 'infinite',
|
||||||
upgrade = true
|
upgrade = true
|
||||||
}})
|
}})
|
||||||
end
|
end
|
||||||
|
|
||||||
for k, v in pairs(items.item_productivity) do
|
|
||||||
if data.raw.technology[v] then
|
|
||||||
add_prod_tech(k, v)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user