diff --git a/PHI-CL/changelog.txt b/PHI-CL/changelog.txt index 78958e0..36f1501 100644 --- a/PHI-CL/changelog.txt +++ b/PHI-CL/changelog.txt @@ -1,9 +1,18 @@ +--------------------------------------------------------------------------------------------------- +Version: 3.0.54 +Date: 2025-01-08 + + Changes: + - [EN] Option for the solar energy ratio. + --------------------------------------------------------------------------------------------------- Version: 3.0.53 Date: 2025-01-07 Features: - [SA] Quality train wagon size. + + Changes: - [SA] Decreased asteroid rate for single planet run. --------------------------------------------------------------------------------------------------- diff --git a/PHI-CL/info.json b/PHI-CL/info.json index a22996d..d59f1d6 100644 --- a/PHI-CL/info.json +++ b/PHI-CL/info.json @@ -1,8 +1,8 @@ { "name": "PHI-CL", - "version": "3.0.53", + "version": "3.0.54", "factorio_version": "2.0", - "date": "2025-01-07", + "date": "2025-01-08", "title": "Phidias Collection", "author": "PHIDIAS0303", "contributers": "", diff --git a/PHI-CL/locale/en/locale.cfg b/PHI-CL/locale/en/locale.cfg index b2133a6..fcefc6a 100644 --- a/PHI-CL/locale/en/locale.cfg +++ b/PHI-CL/locale/en/locale.cfg @@ -95,7 +95,8 @@ empty-world=Useful for design [mod-setting-name] PHI-EN=[color=255,254,42]EN Enable compound energy[/color] PHI-EN-SOLAR-TIER=EN1 Solar panel tier -PHI-EN-POWER-TIER=EN2 Power tier +PHI-EN-SOLAR-RATIO=EN2 Solar Ratio +PHI-EN-POWER-TIER=EN3 Power tier PHI-MB=[color=255,254,42]MB Enable fast machine[/color] PHI-MB-MACHINE-TIER=MB1 Machine tier diff --git a/PHI-CL/locale/ja/locale.cfg b/PHI-CL/locale/ja/locale.cfg index 82c473b..7357596 100644 --- a/PHI-CL/locale/ja/locale.cfg +++ b/PHI-CL/locale/ja/locale.cfg @@ -94,7 +94,8 @@ empty-world=デザインに役立つ [mod-setting-name] PHI-EN=[color=255,254,42]EN 複合発電を有効にする[/color] PHI-EN-SOLAR-TIER=EN1 ソーラーパネルの最高等級 -PHI-EN-POWER-TIER=EN2 パワーの最高等級 +PHI-EN-SOLAR-RATIO=EN2 ソーラーパネルマルチプライヤ +PHI-EN-POWER-TIER=EN3 パワーの最高等級 PHI-MB=[color=255,254,42]MB より速く機械を有効にする[/color] PHI-MB-MACHINE-TIER=MB1 機械の最高等級 diff --git a/PHI-CL/locale/zh-CN/locale.cfg b/PHI-CL/locale/zh-CN/locale.cfg index 49147aa..36309b1 100644 --- a/PHI-CL/locale/zh-CN/locale.cfg +++ b/PHI-CL/locale/zh-CN/locale.cfg @@ -94,7 +94,8 @@ empty-world=對設計有用 [mod-setting-name] PHI-EN=[color=255,254,42]EN 啟用複合發電[/color] PHI-EN-SOLAR-TIER=EN1 太陽能板的最高等級 -PHI-EN-POWER-TIER=EN2 電力的最高等級 +PHI-EN-SOLAR-RATIO=EN2 太陽能板倍數 +PHI-EN-POWER-TIER=EN3 電力的最高等級 PHI-MB=[color=255,254,42]MB 啟用快速機器[/color] PHI-MB-MACHINE-TIER=MB1 機器的最高等級 diff --git a/PHI-CL/locale/zh-TW/locale.cfg b/PHI-CL/locale/zh-TW/locale.cfg index 49147aa..36309b1 100644 --- a/PHI-CL/locale/zh-TW/locale.cfg +++ b/PHI-CL/locale/zh-TW/locale.cfg @@ -94,7 +94,8 @@ empty-world=對設計有用 [mod-setting-name] PHI-EN=[color=255,254,42]EN 啟用複合發電[/color] PHI-EN-SOLAR-TIER=EN1 太陽能板的最高等級 -PHI-EN-POWER-TIER=EN2 電力的最高等級 +PHI-EN-SOLAR-RATIO=EN2 太陽能板倍數 +PHI-EN-POWER-TIER=EN3 電力的最高等級 PHI-MB=[color=255,254,42]MB 啟用快速機器[/color] PHI-MB-MACHINE-TIER=MB1 機器的最高等級 diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index a1cb3a9..2151464 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -36,8 +36,12 @@ function main.EEE(source, tier) item.next_upgrade = source.name .. '-' .. (tier + 1) end + --[[ + TODO some better handle of EEE code + ]] + for _, v in pairs({'production', 'energy_usage', 'heating_energy', 'crane_energy_usage', 'energy_per_shot'}) do - if item[v] then + if not (source.tech == 'compound-energy' and (source.type == 'solar-panel' or source.type == 'accumulator')) and item[v] then item[v] = tonumber(string.match(item[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. (string.match(item[v], '%a+') or '') end end @@ -50,7 +54,7 @@ function main.EEE(source, tier) if item.energy_source then for _, v in pairs({'buffer_capacity', 'input_flow_limit', 'output_flow_limit'}) do - if item.energy_source[v] then + if not (source.tech == 'compound-energy' and (source.type == 'solar-panel' or source.type == 'accumulator')) and item[v] then item.energy_source[v] = tonumber(string.match(item.energy_source[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. string.match(item.energy_source[v], '%a+') end end @@ -128,12 +132,12 @@ function main.EEE(source, tier) for _, v in pairs({'buffer_capacity', 'input_flow_limit', 'output_flow_limit'}) do if item.energy_source[v] then - item.energy_source[v] = tonumber(string.match(item.energy_source[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. string.match(item.energy_source[v], '%a+') + item.energy_source[v] = tonumber(string.match(item.energy_source[v], '[%d%.]+')) * (settings.startup['PHI-EN-SOLAR-RATIO'].value ^ (tier - source.min + 1)) .. string.match(item.energy_source[v], '%a+') end end elseif (source.type == 'solar-panel') then - item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.production, '%a+') + item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (settings.startup['PHI-EN-SOLAR-RATIO'].value ^ (tier - source.min + 1))) .. string.match(item.production, '%a+') elseif (source.type == 'boiler') then item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * tier) .. string.match(item.energy_consumption, '%a+') @@ -424,7 +428,7 @@ function main.ER(source, tier) icons = icons, energy_required = 2, enabled = false, - ingredients = {{type='item', name=ingredient_name, amount=4}}, + ingredients = {{type='item', name=ingredient_name, amount=settings.startup['PHI-EN-SOLAR-RATIO'].value}}, results = {{type='item', name=result_name, amount=1}}, main_product = result_name, localised_name = {'phi-cl.combine', data.raw[source.type][new_name].localised_name, ''} diff --git a/PHI-CL/settings.lua b/PHI-CL/settings.lua index 8ccdc27..126de61 100644 --- a/PHI-CL/settings.lua +++ b/PHI-CL/settings.lua @@ -12,13 +12,21 @@ data:extend({ default_value = 8, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, order = 'A01' +}, { + type = 'int-setting', + name = 'PHI-EN-SOLAR-RATIO', + setting_type = 'startup', + default_value = 4, + minimum_value = 2, + maximum_value = 16, + order = 'A02' }, { type = 'int-setting', name = 'PHI-EN-POWER-TIER', setting_type = 'startup', default_value = 1, allowed_values = {1, 2, 3, 4, 5}, - order = 'A02' + order = 'A03' }, { type = 'bool-setting', name = 'PHI-MB',