From 49807afb1f5729d44afaa4f03471ba806de8ebbb Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 29 Oct 2024 22:01:58 +0900 Subject: [PATCH] . --- PHI-CL/config.lua | 88 ++--------------------- PHI-CL/data-final-fixes.lua | 5 ++ PHI-CL/data-updates.lua | 2 + PHI-CL/data.lua | 2 + PHI-CL/locale/en/locale.cfg | 9 ++- PHI-CL/locale/ja/locale.cfg | 9 ++- PHI-CL/locale/zh-CN/locale.cfg | 9 ++- PHI-CL/locale/zh-TW/locale.cfg | 9 ++- PHI-CL/main.lua | 23 +++--- PHI-CL/note.lua | 123 ++++++++++++++++++++++++++++++++- PHI-CL/settings.lua | 68 +++++++----------- 11 files changed, 199 insertions(+), 148 deletions(-) diff --git a/PHI-CL/config.lua b/PHI-CL/config.lua index 4dec700..a8995d4 100644 --- a/PHI-CL/config.lua +++ b/PHI-CL/config.lua @@ -243,91 +243,11 @@ local items = { min = 2, max = settings.startup['PHI-WE-RADAR-TIER'].value } - }, - ['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, - 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, - type = 'energy-shield-equipment', - name = 'energy-shield', - ref_name = 'energy-shield-mk2-equipment', - tech = 'energy-shield-mk2-equipment', - min = 3, - max = settings.startup['PHI-EQ-DEFENSE-TIER'].value - }, - ['personal-roboport-equipment'] = { - enabled = settings.startup['PHI-EQ'].value, - stage = 1, - type = 'roboport-equipment', - name = 'personal-roboport', - ref_name = 'personal-roboport-mk2-equipment', - tech = 'personal-roboport-mk2-equipment', - min = 3, - max = settings.startup['PHI-EQ-TOOL-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 - }, - ['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 - } } + --[[, + ['equipment'] = { + } + ]] } if mods and mods['space-age'] then diff --git a/PHI-CL/data-final-fixes.lua b/PHI-CL/data-final-fixes.lua index 5116d31..e2eb2ae 100644 --- a/PHI-CL/data-final-fixes.lua +++ b/PHI-CL/data-final-fixes.lua @@ -2,6 +2,11 @@ local items = require 'config' local main = require 'main' local file_stage = 3 +if settings.startup['PHI-CT'].value then + data.raw['utility-constants'].default.rocket_lift_weight = settings.startup['PHI-CT-ROCKET-CAPACITY'].value * 100000 + data.raw['utility-constants'].default.default_item_weight = settings.startup['PHI-CT-CARGO-WEIGHT'].value +end + for _, v in pairs(items['item']) do if (v.stage <= file_stage) and v.enabled and (v.max >= v.min) then v.category = 'item' diff --git a/PHI-CL/data-updates.lua b/PHI-CL/data-updates.lua index 7a0b0a7..65b8e1c 100644 --- a/PHI-CL/data-updates.lua +++ b/PHI-CL/data-updates.lua @@ -17,6 +17,7 @@ for _, v in pairs(items['item']) do end end +--[[ for _, v in pairs(items['equipment']) do if (v.stage == file_stage) and v.enabled and (v.max >= v.min) then v.category = 'equipment' @@ -29,3 +30,4 @@ for _, v in pairs(items['equipment']) do end end end +]] diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua index 2330cf5..81f39fa 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -506,6 +506,7 @@ for _, v in pairs(items['item']) do end end +--[[ for _, v in pairs(items['equipment']) do if (v.stage == file_stage) and v.enabled and (v.max >= v.min) then v.category = 'equipment' @@ -518,3 +519,4 @@ for _, v in pairs(items['equipment']) do end end end +]] diff --git a/PHI-CL/locale/en/locale.cfg b/PHI-CL/locale/en/locale.cfg index 6f0a160..6893abd 100644 --- a/PHI-CL/locale/en/locale.cfg +++ b/PHI-CL/locale/en/locale.cfg @@ -122,8 +122,10 @@ PHI-CT=CT Creative testing tools PHI-CT-TOOL=CT1 Tool PHI-CT-UTILITY=CT2 Utility PHI-CT-HIDDEN=CT3 Hidden -PHI-CT-TILE=CT4 World tile -PHI-CT-TILE-CHOICE=CT5 Tile choice +PHI-CT-ROCKET-CAPACITY=CT4 Rocket capacity +PHI-CT-CARGO-WEIGHT=CT5 Rocket cargo weight +PHI-CT-TILE=CT6 World tile +PHI-CT-TILE-CHOICE=CT7 Tile choice [mod-setting-description] PHI-EN-SOLAR-TIER=Default 8 ; Disable 1 @@ -144,3 +146,6 @@ PHI-MI-REPAIR=Default 1 PHI-MI-PIPE=Default 1 PHI-MI-ROBOT=Default 1 PHI-MI-TRAIN=Default 1 + +PHI-CT-CARGO-WEIGHT='000 KG +PHI-CT-TILE=KG diff --git a/PHI-CL/locale/ja/locale.cfg b/PHI-CL/locale/ja/locale.cfg index 32016f8..2eeefa8 100644 --- a/PHI-CL/locale/ja/locale.cfg +++ b/PHI-CL/locale/ja/locale.cfg @@ -121,8 +121,10 @@ PHI-CT=CT クリエイティブテストツール PHI-CT-TOOL=CT1 ツール PHI-CT-UTILITY=CT2 ユーティリティ PHI-CT-HIDDEN=CT3 非表示 -PHI-CT-TILE=CT4 ワールドタイル -PHI-CT-TILE-CHOICE=CT5 ドタイル選択 +PHI-CT-ROCKET-CAPACITY=CT4 ロケット容量 +PHI-CT-CARGO-WEIGHT=CT5 ロケット積載重量 +PHI-CT-TILE=CT6 ワールドタイル +PHI-CT-TILE-CHOICE=CT7 ドタイル選択 [mod-setting-description] PHI-EN-SOLAR-TIER=デフォルト 8 ; 止める 1 @@ -143,3 +145,6 @@ PHI-MI-REPAIR=デフォルト 1 PHI-MI-PIPE=デフォルト 1 PHI-MI-ROBOT=デフォルト 1 PHI-MI-TRAIN=デフォルト 1 + +PHI-CT-CARGO-WEIGHT='000 KG +PHI-CT-TILE=KG diff --git a/PHI-CL/locale/zh-CN/locale.cfg b/PHI-CL/locale/zh-CN/locale.cfg index 8e15bd2..75903ab 100644 --- a/PHI-CL/locale/zh-CN/locale.cfg +++ b/PHI-CL/locale/zh-CN/locale.cfg @@ -121,8 +121,10 @@ PHI-CT=CT 創意測試工具 PHI-CT-TOOL=CT1 工具 PHI-CT-UTILITY=CT2 雜項 PHI-CT-HIDDEN=CT3 隱藏 -PHI-CT-TILE=CT4 世界地磚 -PHI-CT-TILE-CHOICE=CT5 地磚選擇 +PHI-CT-ROCKET-CAPACITY=CT4 火箭容量 +PHI-CT-CARGO-WEIGHT=CT5 火箭貨物重量 +PHI-CT-TILE=CT6 世界地磚 +PHI-CT-TILE-CHOICE=CT7 地磚選擇 [mod-setting-description] PHI-EN-SOLAR-TIER=預設 8 ; 停用 1 @@ -144,4 +146,5 @@ PHI-MI-PIPE=預設 1 PHI-MI-ROBOT=預設 1 PHI-MI-TRAIN=預設 1 -PHI-XW-WATER=預設 1 ; 停用 0 +PHI-CT-CARGO-WEIGHT='000 KG +PHI-CT-TILE=KG diff --git a/PHI-CL/locale/zh-TW/locale.cfg b/PHI-CL/locale/zh-TW/locale.cfg index 8e15bd2..75903ab 100644 --- a/PHI-CL/locale/zh-TW/locale.cfg +++ b/PHI-CL/locale/zh-TW/locale.cfg @@ -121,8 +121,10 @@ PHI-CT=CT 創意測試工具 PHI-CT-TOOL=CT1 工具 PHI-CT-UTILITY=CT2 雜項 PHI-CT-HIDDEN=CT3 隱藏 -PHI-CT-TILE=CT4 世界地磚 -PHI-CT-TILE-CHOICE=CT5 地磚選擇 +PHI-CT-ROCKET-CAPACITY=CT4 火箭容量 +PHI-CT-CARGO-WEIGHT=CT5 火箭貨物重量 +PHI-CT-TILE=CT6 世界地磚 +PHI-CT-TILE-CHOICE=CT7 地磚選擇 [mod-setting-description] PHI-EN-SOLAR-TIER=預設 8 ; 停用 1 @@ -144,4 +146,5 @@ PHI-MI-PIPE=預設 1 PHI-MI-ROBOT=預設 1 PHI-MI-TRAIN=預設 1 -PHI-XW-WATER=預設 1 ; 停用 0 +PHI-CT-CARGO-WEIGHT='000 KG +PHI-CT-TILE=KG diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index 1007bd8..4b1b624 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -34,6 +34,10 @@ function main.EEE(source, tier) item.energy_usage = tonumber(string.match(item.energy_usage, '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. string.match(item.energy_usage, '%a+') end + if item.ingredient_to_weight_coefficient then + item.ingredient_to_weight_coefficient = nil + end + if (source.type == 'electric-turret') or (source.type == 'ammo-turret') or (source.type == 'fluid-turret') then item.attack_parameters.damage_modifier = 2 ^ (tier - source.min + 1) item.attack_parameters.range = item.attack_parameters.range + (2 * (tier - source.min + 1)) @@ -247,16 +251,18 @@ function main.EEQ(source, tier) 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 - elseif item.energy_input then + 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+') end if item.darkness_to_turn_on and item.color_lookup then item.darkness_to_turn_on = 0 item.color_lookup = {{0, '__core__/graphics/color_luts/lut-sunset.png'}} + end - elseif item.attack_parameters then + if item.attack_parameters then if item.attack_parameters.cooldown then item.attack_parameters.cooldown = math.floor(item.attack_parameters.cooldown * ((32 - (tier - source.min + 1)) / 32)) end @@ -281,25 +287,24 @@ function main.EEQ(source, tier) if item.attack_parameters.range then item.attack_parameters.range = item.attack_parameters.range + (tier - source.min + 1) end + end - elseif item.max_shield_value and item.energy_per_shield then + 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 - elseif item.movement_bonus then + if item.movement_bonus then item.movement_bonus = item.movement_bonus * (2 ^ (tier - source.min + 1)) + end - elseif item.charging_energy and item.charging_station_count then + 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] - - if item.sprite.hr_version then - item.sprite.hr_version.tint = items['tint'][tier] - end end item.localised_name = {'phi-cl.combine-gen', {'name.' .. source.ref_name}, tostring(tier)} diff --git a/PHI-CL/note.lua b/PHI-CL/note.lua index 06022fd..f0e0a63 100644 --- a/PHI-CL/note.lua +++ b/PHI-CL/note.lua @@ -1,5 +1,88 @@ --[[ ** CONFIG +['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, + 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, + type = 'energy-shield-equipment', + name = 'energy-shield', + ref_name = 'energy-shield-mk2-equipment', + tech = 'energy-shield-mk2-equipment', + min = 3, + max = settings.startup['PHI-EQ-DEFENSE-TIER'].value + }, + ['personal-roboport-equipment'] = { + enabled = settings.startup['PHI-EQ'].value, + stage = 1, + type = 'roboport-equipment', + name = 'personal-roboport', + ref_name = 'personal-roboport-mk2-equipment', + tech = 'personal-roboport-mk2-equipment', + min = 3, + max = settings.startup['PHI-EQ-TOOL-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 + }, + ['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 + } + items['item']['agricultural-tower'] = { enabled = settings.startup['PHI-MB'].value, stage = 2, @@ -1050,6 +1133,42 @@ end end ** SETTING +{ + type = 'bool-setting', + name = 'PHI-EQ', + setting_type = 'startup', + default_value = false, + order = 'D00' + }, +{ + type = 'int-setting', + name = 'PHI-EQ-POWER-TIER', + setting_type = 'startup', + default_value = 8, + allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, + order = 'D01' + }, { + type = 'int-setting', + name = 'PHI-EQ-DEFENSE-TIER', + setting_type = 'startup', + default_value = 8, + allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, + order = 'D02' + }, { + type = 'int-setting', + name = 'PHI-EQ-TOOL-TIER', + setting_type = 'startup', + default_value = 8, + allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, + order = 'D03' + }, { + type = 'int-setting', + name = 'PHI-EQ-UTILITY-TIER', + setting_type = 'startup', + default_value = 2, + allowed_values = {1, 2}, + order = 'D04' + }, { type = 'int-setting', name = 'PHI-MI-REPAIR', @@ -1089,14 +1208,14 @@ end name = 'PHI-CT-TILE', setting_type = 'startup', default_value = true, - order = 'J04' + order = 'F04' }, { type = 'string-setting', name = 'PHI-CT-TILE-CHOICE', setting_type = 'startup', default_value = 'grass-1', allowed_values = {'concrete', 'deepwater', 'deepwater-green', 'dirt-1', 'dirt-2', 'dirt-3', 'dirt-4', 'dirt-5', 'dirt-6', 'dirt-7', 'dry-dirt', 'grass-1', 'grass-2', 'grass-3', 'grass-4', 'hazard-concrete-left', 'hazard-concrete-right', 'lab-dark-1', 'lab-dark-2', 'lab-white', 'landfill', 'out-of-map', 'red-desert-0', 'red-desert-1', 'red-desert-2', 'red-desert-3', 'refined-concrete', 'refined-hazard-concrete-left', 'refined-hazard-concrete-right', 'sand-1', 'sand-2', 'sand-3', 'stone-path', 'tutorial-grid', 'water', 'water-green', 'water-mud', 'water-shallow'}, - order = 'J05' + order = 'F05' }, "? aai-industry >= 0.5.0", diff --git a/PHI-CL/settings.lua b/PHI-CL/settings.lua index d8304ee..0f8152d 100644 --- a/PHI-CL/settings.lua +++ b/PHI-CL/settings.lua @@ -23,7 +23,7 @@ data:extend({ type = 'bool-setting', name = 'PHI-MB', setting_type = 'startup', - default_value = false, + default_value = true, order = 'B00' }, { type = 'int-setting', @@ -36,7 +36,7 @@ data:extend({ type = 'bool-setting', name = 'PHI-WE', setting_type = 'startup', - default_value = false, + default_value = true, order = 'C00' }, { type = 'int-setting', @@ -52,40 +52,6 @@ data:extend({ default_value = 3, allowed_values = {1, 2, 3}, order = 'C02' - }, { - type = 'bool-setting', - name = 'PHI-EQ', - setting_type = 'startup', - default_value = false, - order = 'D00' - }, { - type = 'int-setting', - name = 'PHI-EQ-POWER-TIER', - setting_type = 'startup', - default_value = 8, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'D01' - }, { - type = 'int-setting', - name = 'PHI-EQ-DEFENSE-TIER', - setting_type = 'startup', - default_value = 8, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'D02' - }, { - type = 'int-setting', - name = 'PHI-EQ-TOOL-TIER', - setting_type = 'startup', - default_value = 8, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'D03' - }, { - type = 'int-setting', - name = 'PHI-EQ-UTILITY-TIER', - setting_type = 'startup', - default_value = 2, - allowed_values = {1, 2}, - order = 'D04' }, { type = 'bool-setting', name = 'PHI-MI', @@ -116,25 +82,41 @@ data:extend({ type = 'bool-setting', name = 'PHI-CT', setting_type = 'startup', - default_value = false, - order = 'J00' + default_value = true, + order = 'F00' }, { type = 'bool-setting', name = 'PHI-CT-TOOL', setting_type = 'startup', - default_value = true, - order = 'J01' + default_value = false, + order = 'F01' }, { type = 'bool-setting', name = 'PHI-CT-UTILITY', setting_type = 'startup', default_value = true, - order = 'J02' + order = 'F02' }, { type = 'bool-setting', name = 'PHI-CT-HIDDEN', setting_type = 'startup', - default_value = true, - order = 'J03' + default_value = false, + order = 'F03' + }, { + type = 'int-setting', + name = 'PHI-CT-ROCKET-CAPACITY', + setting_type = 'startup', + default_value = 10, + minimum_value = 1, + maximum_value = 10000, + order = 'F04' + }, { + type = 'int-setting', + name = 'PHI-CT-CARGO-WEIGHT', + setting_type = 'startup', + default_value = 100, + minimum_value = 1, + maximum_value = 1000, + order = 'F05' } })