From 93b991101f8d8e8d1e1e22c33f2774f14c4f0de8 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 28 Apr 2026 20:48:21 +0900 Subject: [PATCH] . --- PHI-CL/changelog.txt | 2 ++ PHI-CL/data/b/mi.lua | 61 ++++++------------------------------------- PHI-CL/data/b/mig.lua | 23 +++++++++++----- PHI-CL/settings.lua | 22 ++-------------- 4 files changed, 29 insertions(+), 79 deletions(-) diff --git a/PHI-CL/changelog.txt b/PHI-CL/changelog.txt index 2d58b9f..9e9b7a2 100644 --- a/PHI-CL/changelog.txt +++ b/PHI-CL/changelog.txt @@ -5,6 +5,8 @@ Date: 2026-04-12 Changes: - [MI] Generic code layout restructure. - [MI] Removed basic chests. + - [MI] Removed train speed settings. + - [MI] Removed robot speed settings. --------------------------------------------------------------------------------------------------- Version: 3.0.135 diff --git a/PHI-CL/data/b/mi.lua b/PHI-CL/data/b/mi.lua index 5009f79..3460ca2 100644 --- a/PHI-CL/data/b/mi.lua +++ b/PHI-CL/data/b/mi.lua @@ -1,61 +1,16 @@ if settings.startup['PHI-MI-PIPE'].value then - local s = settings.startup['PHI-MI-PIPE'].value / 10 - - -- MI C 2 BASE ENTITY - for _, t in pairs({data.raw['offshore-pump'], data.raw['pump']}) do - for _, v in pairs(t) do - v.pumping_speed = v.pumping_speed * s - end - end - - -- MI C 3 BASE ENTITY - for _, v in pairs(data.raw['valve']) do - v.flow_rate = v.flow_rate * s - end - - -- MI C 3 BASE ENTITY - for _, t in pairs({data.raw['pipe'], data.raw['pipe-to-ground'], data.raw['infinity-pipe']}) do - for _, v in pairs(t) do - v.fluid_box.volume = v.fluid_box.volume * s - end - end - -- MI C 1 BASE UTILITY_CONSTANTS - data.raw['utility-constants'].default.max_fluid_flow = 100 * s + data.raw['utility-constants'].default.max_fluid_flow = 10 * settings.startup['PHI-MI-PIPE'].value end -if settings.startup['PHI-MI-ROBOT'].value then - local s = settings.startup['PHI-MI-ROBOT'].value / 10 - - -- MI C 2 BASE ENTITY - for _, t in pairs({data.raw['construction-robot'], data.raw['logistic-robot']}) do - for _, v in pairs(t) do - v.speed = v.speed * s - - if settings.startup['PHI-MI-ROBOT-ENERGY'].value then - v.energy_per_tick = (v.energy_per_tick and '0J') or nil - v.energy_per_move = (v.energy_per_move and '0J') or nil - v.speed_multiplier_when_out_of_energy = (v.speed_multiplier_when_out_of_energy and 1) or nil - end - end - end -end - -if settings.startup['PHI-MI-TRAIN'].value then - local s = settings.startup['PHI-MI-TRAIN'].value / 10 - - -- MI C 4 BASE ENTITY - for _, t in pairs({data.raw['locomotive'], data.raw['cargo-wagon'], data.raw['fluid-wagon'], data.raw['artillery-wagon']}) do - for _, v in pairs(t) do - v.max_health = (v.max_health and (v.max_health * s)) or nil - v.max_speed = (v.max_speed and (v.max_speed * s)) or nil - v.braking_force = (v.braking_force and (v.braking_force * s)) or nil - - if v.max_power then - v.max_power = tostring(tonumber(string.match(v.max_power, '[%d%.]+')) * s) .. string.match(v.max_power, '%a+') - v.reversing_power_modifier = 1 - end +-- MI C 2 BASE ENTITY +for _, t in pairs({data.raw['construction-robot'], data.raw['logistic-robot']}) do + for _, v in pairs(t) do + if settings.startup['PHI-MI-ROBOT-ENERGY'].value then + v.energy_per_tick = (v.energy_per_tick and '0J') or nil + v.energy_per_move = (v.energy_per_move and '0J') or nil + v.speed_multiplier_when_out_of_energy = (v.speed_multiplier_when_out_of_energy and 1) or nil end end end diff --git a/PHI-CL/data/b/mig.lua b/PHI-CL/data/b/mig.lua index a616eaf..7a8f554 100644 --- a/PHI-CL/data/b/mig.lua +++ b/PHI-CL/data/b/mig.lua @@ -3,8 +3,7 @@ local items = require 'config' -- MIG C 1 BASE ARMOR_EQUIPMENT data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true --- MIG C 3 BASE ENTITY -data.raw['inserter']['burner-inserter'].allow_burner_leech = true +-- MIG C 2 BASE ENTITY data.raw['programmable-speaker']['programmable-speaker'].energy_source.usage_priority = 'primary-input' table.insert(data.raw['fluid-turret']['flamethrower-turret'].attack_parameters.fluids, {type = 'sulfuric-acid', damage_modifier = 1.2}) @@ -18,15 +17,23 @@ for _, v in pairs(data.raw['logistic-container']) do v.inventory_type = 'with_filters_and_bar' end +-- MI C 4 BASE ENTITY +for _, t in pairs({data.raw['locomotive'], data.raw['cargo-wagon'], data.raw['fluid-wagon'], data.raw['artillery-wagon']}) do + for _, v in pairs(t) do + v.reversing_power_modifier = 1 + end +end + -- MIG C 1 BASE ENTITY for _, v in pairs(data.raw['reactor']) do v.scale_energy_usage = (v.fast_replaceable_group and v.fast_replaceable_group == 'reactor') end --- MIG C 1 BASE ENTITY -for _, v in pairs(data.raw['pump']) do - v.pumping_speed = math.max(50, v.pumping_speed) * settings.startup['PHI-MI-PIPE'].value / 10 - v.heating_energy = nil +-- MIG C 8 BASE ENTITY +for _, t in pairs({data.raw['offshore-pump'], data.raw['pump'], data.raw['valve'], data.raw['pipe'], data.raw['pipe-to-ground'], data.raw['infinity-pipe']}) do + for _, v in pairs(t) do + v.heating_energy = nil + end end -- MIG C 2 BASE ENTITY @@ -158,6 +165,10 @@ for _, v in pairs(data.raw['inserter']) do if v.energy_source and v.energy_source.type and (v.energy_source.type == 'electric' or v.energy_source.type == 'void' or v.energy_source.type == 'burner') then v.allow_custom_vectors = true v.flags = {'placeable-neutral', 'placeable-player', 'player-creation', ((v.hand_size and v.hand_size < 1) and 'building-direction-8-way') or 'building-direction-16-way'} + + if v.energy_source.type == 'burner' then + v.allow_burner_leech = true + end end end diff --git a/PHI-CL/settings.lua b/PHI-CL/settings.lua index 2eb24a4..88643fe 100644 --- a/PHI-CL/settings.lua +++ b/PHI-CL/settings.lua @@ -96,31 +96,13 @@ data:extend({ maximum_value = 160, localised_name = {'phi-cl.setting-class-color', {'mod-setting-name-prefix.PHI-MI-PIPE'}, {'phi-cl.proportion', {'mod-setting-name.PHI-MI-PIPE'}}}, order = 'B02' -}, { - type = 'int-setting', - name = 'PHI-MI-ROBOT', - setting_type = 'startup', - default_value = 10, - minimum_value = 1, - maximum_value = 160, - localised_name = {'phi-cl.setting-class-color', {'mod-setting-name-prefix.PHI-MI-ROBOT'}, {'phi-cl.proportion', {'mod-setting-name.PHI-MI-ROBOT'}}}, - order = 'B03' }, { type = 'bool-setting', name = 'PHI-MI-ROBOT-ENERGY', setting_type = 'startup', default_value = false, localised_name = {'phi-cl.setting-class-color', {'mod-setting-name-prefix.PHI-MI-ROBOT-ENERGY'}, {'phi-cl.enable', {'mod-setting-name.PHI-MI-ROBOT-ENERGY'}}}, - order = 'B04' -}, { - type = 'int-setting', - name = 'PHI-MI-TRAIN', - setting_type = 'startup', - default_value = 10, - minimum_value = 1, - maximum_value = 160, - localised_name = {'phi-cl.setting-class-color', {'mod-setting-name-prefix.PHI-MI-TRAIN'}, {'phi-cl.proportion', {'mod-setting-name.PHI-MI-TRAIN'}}}, - order = 'B05' + order = 'B03' }, { type = 'int-setting', name = 'PHI-MI-PIPE-EXTENT', @@ -129,7 +111,7 @@ data:extend({ minimum_value = 80, maximum_value = 10240, localised_name = {'phi-cl.setting-class-color', {'mod-setting-name-prefix.PHI-MI-PIPE-EXTENT'}, {'mod-setting-name.PHI-MI-PIPE-EXTENT'}}, - order = 'B06' + order = 'B04' }, { type = 'bool-setting', name = 'PHI-SA',