mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-06-27 05:46:22 +09:00
.
This commit is contained in:
+4
-19
@@ -82,7 +82,6 @@ function main_entity(source, tier)
|
||||
end
|
||||
end
|
||||
|
||||
if source.tech == 'compound-energy' then
|
||||
if mods['space-age'] and (not (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'VP')) then
|
||||
if not item.surface_conditions then
|
||||
item.surface_conditions = {}
|
||||
@@ -139,7 +138,6 @@ function main_entity(source, tier)
|
||||
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * (2 * (tier - source.min + 1))) .. string.match(item.heat_buffer.max_transfer, '%a+')
|
||||
tint_handle(item, tier, {'connection_sprites', 'heat_glow_sprites'})
|
||||
end
|
||||
end
|
||||
|
||||
tint_handle(item, tier, {'picture', 'pictures', 'animation', 'structure', 'integration_patch', 'horizontal_animation', 'vertical_animation'})
|
||||
|
||||
@@ -188,13 +186,8 @@ function main_item(source, tier)
|
||||
item.icons[1].tint = mod_tint[tier]
|
||||
|
||||
elseif item.icon then
|
||||
item.icons = {{icon = item.icon, tint = mod_tint[tier]}}
|
||||
item.icons = {{icon = item.icon, icon_size = (item.icon_size and item.icon_size) or nil, tint = mod_tint[tier]}}
|
||||
item.icon = nil
|
||||
|
||||
if item.icon_size then
|
||||
item.icons[1].icon_size = item.icon_size
|
||||
item.icon_size = nil
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(item.icons, {icon = '__base__/graphics/icons/signal/signal_' .. tier .. '.png', icon_size = 64, scale = 0.25, shift = {12, 12}})
|
||||
@@ -206,16 +199,7 @@ function main_item(source, tier)
|
||||
end
|
||||
|
||||
function main_recipe(source, tier)
|
||||
local result_name = source.name .. ((source.category == 'equipment' and ('-mk' .. tier .. '-equipment')) or ('-' .. tier))
|
||||
local ingredients = {}
|
||||
local ingredient_name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name
|
||||
|
||||
if source.tech == 'compound-energy' and (source.type == 'solar-panel' or source.type == 'accumulator') then
|
||||
table.insert(ingredients, {type = 'item', name = ingredient_name, amount = tonumber(settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value) or 4})
|
||||
|
||||
else
|
||||
table.insert(ingredients, {type = 'item', name = ingredient_name, amount = 2})
|
||||
end
|
||||
local result_name = source.name .. '-' .. tier
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
@@ -223,7 +207,7 @@ function main_recipe(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 = ((source.tech == 'compound-energy' and (source.type == 'solar-panel' or source.type == 'accumulator')) and tonumber(settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value) or 4) or 2}},
|
||||
results = {{type = 'item', name = result_name, amount = 1}},
|
||||
main_product = result_name,
|
||||
localised_name = {'?', data.raw[source.type][result_name].localised_name, ''},
|
||||
@@ -265,6 +249,7 @@ for _, v in pairs(items) do
|
||||
main_entity(v, j)
|
||||
main_item(v, j)
|
||||
main_recipe(v, j)
|
||||
|
||||
table.insert(data.raw.technology['compound-energy-' .. (j - 1)].effects, {type='unlock-recipe', recipe=v.name .. '-' .. j})
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user