mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 02:55:22 +09:00
.
This commit is contained in:
@@ -296,7 +296,7 @@ end
|
||||
-- recipe
|
||||
function main.ER(source, tier)
|
||||
local icons = {{icon = data.raw.item[source.ref_name].icon, tint = items['tint'][tier]}}
|
||||
local ingredient_name = ((source.category == 'equipment' and (((tier == 2) and (source.name .. '-equipment')) or (source.name .. '-mk' .. (tier - 1) .. '-equipment'))) or (source.name .. ((tier > 2) and ('-' .. (tier - 1)) or '')))
|
||||
local ingredient_name = ((source.category == 'equipment' and (((tier == source.min) and (source.name .. '-equipment')) or (source.name .. '-mk' .. (tier - 1) .. '-equipment'))) or (source.name .. ((tier > source.min) and ('-' .. (tier - 1)) or '')))
|
||||
local result_name = source.name .. ((source.category == 'equipment' and ('-mk' .. tier .. '-equipment')) or ('-' .. tier))
|
||||
|
||||
data:extend({{
|
||||
@@ -305,7 +305,7 @@ function main.ER(source, tier)
|
||||
icons = icons,
|
||||
energy_required = 2,
|
||||
enabled = false,
|
||||
ingredients = (source.tech == 'compound-energy' and (((source.type == 'solar-panel') or (source.type == 'accumulator')) and {{type = 'item', name = ingredient_name, amount = tonumber(settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value) or 4}}) or ((tier > 2 and {{type = 'item', name = ingredient_name, amount = 1}, {type='item', name = source.ref_name, amount = 1}}) or {{type = 'item', name = source.ref_name, amount = 2}})) or {{type = 'item', name = ingredient_name, amount = 2}},
|
||||
ingredients = (source.tech == 'compound-energy' and (((source.type == 'solar-panel') or (source.type == 'accumulator')) and {{type = 'item', name = ingredient_name, amount = tonumber(settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value) or 4}}) or ((tier > source.min and {{type = 'item', name = ingredient_name, amount = 1}, {type='item', name = source.ref_name, amount = 1}}) or {{type = 'item', name = source.ref_name, amount = 2}})) or {{type = 'item', name = ingredient_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, ''},
|
||||
|
||||
Reference in New Issue
Block a user