From 4c94a5df865d2b80d7bba31237313a4f57cdb44c Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Wed, 30 Oct 2024 22:27:26 +0900 Subject: [PATCH] . --- PHI-CL/config.lua | 130 ++++++++++++++++++++------------- PHI-CL/info.json | 4 +- PHI-CL/locale/en/locale.cfg | 11 ++- PHI-CL/locale/ja/locale.cfg | 12 ++- PHI-CL/locale/zh-CN/locale.cfg | 11 ++- PHI-CL/locale/zh-TW/locale.cfg | 11 ++- PHI-CL/main.lua | 51 +++++-------- PHI-CL/note.lua | 4 + 8 files changed, 130 insertions(+), 104 deletions(-) diff --git a/PHI-CL/config.lua b/PHI-CL/config.lua index 4dec700..f47535f 100644 --- a/PHI-CL/config.lua +++ b/PHI-CL/config.lua @@ -245,48 +245,16 @@ local items = { } }, ['equipment'] = { - ['solar-panel-equipment'] = { - enabled = settings.startup['PHI-EQ'].value, - stage = 1, - type = 'solar-panel-equipment', - name = 'solar-panel', - ref_name = 'solar-panel-equipment', - tech = 'solar-panel-equipment', - min = 2, - max = settings.startup['PHI-EQ-POWER-TIER'].value, - base = 30, - graphics_name = 'solar-panel-equipment' - }, - ['fusion-reactor-equipment'] = { - enabled = settings.startup['PHI-EQ'].value, - stage = 1, - type = 'generator-equipment', - name = 'fusion-reactor', - ref_name = 'fusion-reactor-equipment', - tech = 'fusion-reactor-equipment', - min = 2, - max = settings.startup['PHI-EQ-POWER-TIER'].value - }, ['battery-equipment'] = { enabled = settings.startup['PHI-EQ'].value, stage = 1, type = 'battery-equipment', name = 'battery', - ref_name = 'battery-mk3-equipment', - tech = 'battery-mk3-equipment', - min = 4, + ref_name = 'battery-mk2-equipment', + tech = 'battery-mk2-equipment', + min = 3, max = settings.startup['PHI-EQ-POWER-TIER'].value }, - ['personal-laser-defense-equipment'] = { - enabled = settings.startup['PHI-EQ'].value, - stage = 1, - type = 'active-defense-equipment', - name = 'personal-laser-defense', - ref_name = 'personal-laser-defense-equipment', - tech = 'personal-laser-defense-equipment', - min = 2, - max = settings.startup['PHI-EQ-DEFENSE-TIER'].value - }, ['energy-shield-equipment'] = { enabled = settings.startup['PHI-EQ'].value, stage = 1, @@ -297,6 +265,46 @@ local items = { min = 3, max = settings.startup['PHI-EQ-DEFENSE-TIER'].value }, + ['exoskeleton-equipment'] = { + enabled = settings.startup['PHI-EQ'].value, + stage = 1, + type = 'movement-bonus-equipment', + name = 'exoskeleton', + ref_name = 'exoskeleton-equipment', + tech = 'exoskeleton-equipment', + min = 2, + max = settings.startup['PHI-EQ-UTILITY-TIER'].value + }, + ['fission-reactor-equipment'] = { + enabled = settings.startup['PHI-EQ'].value, + stage = 1, + type = 'generator-equipment', + name = 'fission-reactor', + ref_name = 'fission-reactor-equipment', + tech = 'fission-reactor-equipment', + min = 2, + max = settings.startup['PHI-EQ-POWER-TIER'].value + }, + ['night-vision-equipment'] = { + enabled = settings.startup['PHI-EQ'].value, + stage = 1, + type = 'night-vision-equipment', + name = 'night-vision', + ref_name = 'night-vision-equipment', + tech = 'night-vision-equipment', + min = 2, + max = settings.startup['PHI-EQ-UTILITY-TIER'].value + }, + ['personal-laser-defense-equipment'] = { + enabled = settings.startup['PHI-EQ'].value, + stage = 1, + type = 'active-defense-equipment', + name = 'personal-laser-defense', + ref_name = 'personal-laser-defense-equipment', + tech = 'personal-laser-defense-equipment', + min = 2, + max = settings.startup['PHI-EQ-DEFENSE-TIER'].value + }, ['personal-roboport-equipment'] = { enabled = settings.startup['PHI-EQ'].value, stage = 1, @@ -307,25 +315,17 @@ local items = { min = 3, max = settings.startup['PHI-EQ-TOOL-TIER'].value }, - ['night-vision-equipment'] = { + ['solar-panel-equipment'] = { enabled = settings.startup['PHI-EQ'].value, stage = 1, - type = 'night-vision-equipment', - name = 'night-vision', - ref_name = 'night-vision-equipment', - tech = 'night-vision-equipment', + type = 'solar-panel-equipment', + name = 'solar-panel', + ref_name = 'solar-panel-equipment', + tech = 'solar-panel-equipment', min = 2, - max = settings.startup['PHI-EQ-UTILITY-TIER'].value - }, - ['exoskeleton-equipment'] = { - enabled = settings.startup['PHI-EQ'].value, - stage = 1, - type = 'movement-bonus-equipment', - name = 'exoskeleton', - ref_name = 'exoskeleton-equipment', - tech = 'exoskeleton-equipment', - min = 2, - max = settings.startup['PHI-EQ-UTILITY-TIER'].value + max = settings.startup['PHI-EQ-POWER-TIER'].value, + base = 30, + graphics_name = 'solar-panel-equipment' } } } @@ -361,7 +361,7 @@ if mods and mods['space-age'] then ref_name = 'heating-tower', tech = 'heating-tower', min = 2, - max = settings.startup['PHI-MB-MACHINE-TIER'].value + max = settings.startup['PHI-EN-POWER-TIER'].value } items['item']['railgun-turret'] = { @@ -495,6 +495,32 @@ if mods and mods['space-age'] then min = 2, max = settings.startup['PHI-MB-MACHINE-TIER'].value } + + items['equipment']['fusion-reactor-equipment'] = { + enabled = settings.startup['PHI-EQ'].value, + stage = 2, + type = 'generator-equipment', + name = 'fusion-reactor', + ref_name = 'fusion-reactor-equipment', + tech = 'fusion-reactor-equipment', + min = 2, + max = settings.startup['PHI-EQ-POWER-TIER'].value + } + + items['equipment']['toolbar-equipment'] = { + enabled = settings.startup['PHI-EQ'].value, + stage = 2, + type = 'inventory-bonus-equipment', + name = 'toolbar', + ref_name = 'toolbar-equipment', + tech = 'toolbar-equipment', + min = 2, + max = settings.startup['PHI-EQ-UTILITY-TIER'].value + } + + items['equipment']['battery-equipment'].ref_name = 'battery-mk3-equipment' + items['equipment']['battery-equipment'].tech = 'battery-mk3-equipment' + items['equipment']['battery-equipment'].min = 3 end return items diff --git a/PHI-CL/info.json b/PHI-CL/info.json index a70fd97..60e3083 100644 --- a/PHI-CL/info.json +++ b/PHI-CL/info.json @@ -10,9 +10,9 @@ "description": "Additional compound entities and items to reduce the space needed\nSuch as better solar panel, accumulator\nAnd other feature such as large range radar, trash chest and pipe, passive power void, linked chest, empty world generation", "dependencies": [ "base >= 2.0.0", - "? space-age", + "? space-age >= 2.0.0", "? quality >= 2.0.0", - "? elevated-rails > 2.0.0" + "? elevated-rails >= 2.0.0" ], "quality_required": false, "space_travel_required": true, diff --git a/PHI-CL/locale/en/locale.cfg b/PHI-CL/locale/en/locale.cfg index f8e3e9c..63d1112 100644 --- a/PHI-CL/locale/en/locale.cfg +++ b/PHI-CL/locale/en/locale.cfg @@ -58,15 +58,18 @@ rocket-turret=Rocket turret tesla-turret=Tesla turret thruster=Thruster -solar-panel-equipment=Portable solar panel battery-mk2-equipment=Personal battery battery-mk3-equipment=Personal battery -fusion-reactor-equipment=Portable fusion reactor +discharge-defense-equipment=Discharge defense energy-shield-mk2-equipment=Energy shield +exoskeleton-equipment=Exoskeleton +fission-reactor-equipment=Portable fission reactor +fusion-reactor-equipment=Portable fusion reactor +night-vision-equipment=Nightvision equipment personal-laser-defense-equipment=Personal laser defense personal-roboport-mk2-equipment=Personal roboport -night-vision-equipment=Nightvision equipment -exoskeleton-equipment=Exoskeleton +solar-panel-equipment=Portable solar panel +toolbelt-equipment=Toolbelt equipment power-armor-mk2=Power armor mech-armor=Mech armor diff --git a/PHI-CL/locale/ja/locale.cfg b/PHI-CL/locale/ja/locale.cfg index 579a8e8..402df9b 100644 --- a/PHI-CL/locale/ja/locale.cfg +++ b/PHI-CL/locale/ja/locale.cfg @@ -57,15 +57,19 @@ rocket-turret=ロケットタレット tesla-turret=テスラタレット thruster=スラスター -solar-panel-equipment=携帯ソーラーパネルモジュール + battery-mk2-equipment=個人用バッテリー battery-mk3-equipment=個人用バッテリー -fusion-reactor-equipment=携帯核融合炉モジュール +discharge-defense-equipment=携帯放電防御モジュール energy-shield-mk2-equipment=エネルギーシールドモジュール +exoskeleton-equipment=強化外骨格モジュール +fission-reactor-equipment=携帯原子炉モジュール +fusion-reactor-equipment=携帯核融合炉モジュール +night-vision-equipment=暗視モジュール personal-laser-defense-equipment=携帯レーザー防御モジュール personal-roboport-mk2-equipment=携帯ロボットステーション -night-vision-equipment=暗視モジュール -exoskeleton-equipment=強化外骨格モジュール +solar-panel-equipment=携帯ソーラーパネルモジュール +toolbelt-equipment=拡張ツールベルト power-armor-mk2=パワーアーマー mech-armor=メックアーマー diff --git a/PHI-CL/locale/zh-CN/locale.cfg b/PHI-CL/locale/zh-CN/locale.cfg index 12f5fc9..fb79810 100644 --- a/PHI-CL/locale/zh-CN/locale.cfg +++ b/PHI-CL/locale/zh-CN/locale.cfg @@ -57,15 +57,18 @@ rocket-turret=火箭炮塔 tesla-turret=特斯拉炮塔 thruster=推進器 -solar-panel-equipment=攜帶式太陽能板 battery-mk2-equipment=電池設備 battery-mk3-equipment=電池設備 -fusion-reactor-equipment=攜帶式核融合反應器 +discharge-defense-equipment=放電防禦 energy-shield-mk2-equipment=能量護盾 +exoskeleton-equipment=動力外骨骼 +fission-reactor-equipment=攜帶式核分裂反應爐 +fusion-reactor-equipment=攜帶式核融合反應器 +night-vision-equipment=夜視鏡 personal-laser-defense-equipment=個人雷射防禦 personal-roboport-mk2-equipment=機動無人機調度站 -night-vision-equipment=夜視鏡 -exoskeleton-equipment=動力外骨骼 +solar-panel-equipment=攜帶式太陽能板 +toolbelt-equipment=工具腰帶配備 power-armor-mk2=動力護甲 mech-armor=機械裝甲 diff --git a/PHI-CL/locale/zh-TW/locale.cfg b/PHI-CL/locale/zh-TW/locale.cfg index 12f5fc9..fb79810 100644 --- a/PHI-CL/locale/zh-TW/locale.cfg +++ b/PHI-CL/locale/zh-TW/locale.cfg @@ -57,15 +57,18 @@ rocket-turret=火箭炮塔 tesla-turret=特斯拉炮塔 thruster=推進器 -solar-panel-equipment=攜帶式太陽能板 battery-mk2-equipment=電池設備 battery-mk3-equipment=電池設備 -fusion-reactor-equipment=攜帶式核融合反應器 +discharge-defense-equipment=放電防禦 energy-shield-mk2-equipment=能量護盾 +exoskeleton-equipment=動力外骨骼 +fission-reactor-equipment=攜帶式核分裂反應爐 +fusion-reactor-equipment=攜帶式核融合反應器 +night-vision-equipment=夜視鏡 personal-laser-defense-equipment=個人雷射防禦 personal-roboport-mk2-equipment=機動無人機調度站 -night-vision-equipment=夜視鏡 -exoskeleton-equipment=動力外骨骼 +solar-panel-equipment=攜帶式太陽能板 +toolbelt-equipment=工具腰帶配備 power-armor-mk2=動力護甲 mech-armor=機械裝甲 diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index fac3a3d..67bdaa6 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -155,8 +155,11 @@ function main.EEE(source, tier) item.max_distance_of_nearby_sector_revealed = item.max_distance_of_nearby_sector_revealed + (2 * tier) elseif source.type == 'thruster' then - item.min_performance.fluid_usage = item.min_performance.fluid_usage * (2 ^ (tier - source.min + 1)) - item.max_performance.fluid_usage = item.max_performance.fluid_usage * (2 ^ (tier - source.min + 1)) + for _, v in pairs({'min_performance', 'max_performance'}) do + if item[v] and item[v].fluid_usage then + item[v].fluid_usage = item[v].fluid_usage * (2 ^ (tier - source.min + 1)) + end + end elseif source.type == 'reactor' and source.name == 'heating-tower' then item.consumption = tostring(tonumber(string.match(item.consumption, '[%d%.]+')) * tier) .. string.match(item.consumption, '%a+') @@ -227,30 +230,24 @@ function main.EEQ(source, tier) item.name = source.name .. '-mk' .. tier .. '-equipment' item.take_result = source.name .. '-mk' .. tier .. '-equipment' - if item.power then - item.power = tostring(tonumber(string.match(item.power, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.power, '%a+') + for _, v in pairs({'power', 'energy_consumption', 'energy_input', 'charging_energy'}) do + if item[v] then + item[v] = tostring(tonumber(string.match(item[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item[v], '%a+') + end end if item.energy_source then - if item.energy_source.buffer_capacity then - item.energy_source.buffer_capacity = tostring(tonumber(string.match(item.energy_source.buffer_capacity, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.energy_source.buffer_capacity, '%a+') - end - - if item.energy_source.input_flow_limit then - item.energy_source.input_flow_limit = tostring(tonumber(string.match(item.energy_source.input_flow_limit, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.energy_source.input_flow_limit, '%a+') - end - - if item.energy_source.output_flow_limit then - item.energy_source.output_flow_limit = tostring(tonumber(string.match(item.energy_source.output_flow_limit, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.energy_source.output_flow_limit, '%a+') + for _, v in pairs({'buffer_capacity', 'input_flow_limit', 'output_flow_limit'}) do + if item.energy_source[v] then + item.energy_source[v] = tostring(tonumber(string.match(item.energy_source[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.energy_source[v], '%a+') + end end end - if item.energy_consumption then - item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.energy_consumption, '%a+') - end - - if item.energy_input then - item.energy_input = tostring(tonumber(string.match(item.energy_input, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.energy_input, '%a+') + for _, v in pairs({'max_shield_value', 'movement_bonus', 'inventory_size_bonus'}) do + if item[v] then + item[v] = item[v] * (2 ^ (tier - source.min + 1)) + end end if item.darkness_to_turn_on and item.color_lookup then @@ -282,20 +279,6 @@ function main.EEQ(source, tier) end end - if item.max_shield_value and item.energy_per_shield then - item.max_shield_value = item.max_shield_value * (2 ^ (tier - source.min + 1)) - item.energy_per_shield = tostring(math.floor(tonumber(string.match(item.energy_per_shield, '[%d%.]+')) * ((32 - (tier - source.min + 1)) / 32))) .. string.match(item.energy_per_shield, '%a+') - end - - if item.movement_bonus then - item.movement_bonus = item.movement_bonus * (2 ^ (tier - source.min + 1)) - end - - if item.charging_energy and item.charging_station_count then - item.charging_station_count = math.max(item.charging_station_count, 4) - item.charging_energy = tostring(tonumber(string.match(item.charging_energy, '[%d%.]+')) * (2 ^ (tier - source.min + 2))) .. string.match(item.charging_energy, '%a+') - end - if item.sprite then item.sprite.tint = items['tint'][tier] end diff --git a/PHI-CL/note.lua b/PHI-CL/note.lua index 4abd5aa..3af271a 100644 --- a/PHI-CL/note.lua +++ b/PHI-CL/note.lua @@ -644,6 +644,10 @@ item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 2))) .. string.match(item.production, '%a+') end + if item.energy_per_shield then + item.energy_per_shield = tostring(math.floor(tonumber(string.match(item.energy_per_shield, '[%d%.]+')) * ((32 - (tier - source.min + 1)) / 32))) .. string.match(item.energy_per_shield, '%a+') + end + ** DATA if settings.startup['PHI-EQ'].value and settings.startup['PHI-EQ-ARMOR'].value then data:extend({