From 5c0c3ae855f652d7cb144c1183b352b14fee6305 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 9 May 2023 02:17:11 +0900 Subject: [PATCH] Update data.lua --- PHI-EN/data.lua | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/PHI-EN/data.lua b/PHI-EN/data.lua index b7ca468..8b09b28 100644 --- a/PHI-EN/data.lua +++ b/PHI-EN/data.lua @@ -69,30 +69,24 @@ end -- recipe local function ER(source, tier) local na = source.name + local n = 2 if tier > 2 then na = na .. '-' .. (tier - 1) end - if source.type == 'solar-panel' or ource.type == 'accumulator' then - data:extend({{ - type = 'recipe', - name = source.name .. '-' .. tier, - energy_required = 2, - enabled = false, - ingredients = {{na, 4}}, - result = source.name .. '-' .. tier, - }}) - else - data:extend({{ - type = 'recipe', - name = source.name .. '-' .. tier, - energy_required = 2, - enabled = false, - ingredients = {{na, 2}}, - result = source.name .. '-' .. tier, - }}) + if source.type == 'solar-panel' or source.type == 'accumulator' then + n = 4 end + + data:extend({{ + type = 'recipe', + name = source.name .. '-' .. tier, + energy_required = 2, + enabled = false, + ingredients = {{na, n}}, + result = source.name .. '-' .. tier, + }}) end -- technology