This commit is contained in:
2026-04-28 20:48:21 +09:00
parent 69223cd2bd
commit 93b991101f
4 changed files with 29 additions and 79 deletions
+2
View File
@@ -5,6 +5,8 @@ Date: 2026-04-12
Changes: Changes:
- [MI] Generic code layout restructure. - [MI] Generic code layout restructure.
- [MI] Removed basic chests. - [MI] Removed basic chests.
- [MI] Removed train speed settings.
- [MI] Removed robot speed settings.
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 3.0.135 Version: 3.0.135
+3 -48
View File
@@ -1,63 +1,18 @@
if settings.startup['PHI-MI-PIPE'].value then 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 -- 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 end
if settings.startup['PHI-MI-ROBOT'].value then -- MI C 2 BASE ENTITY
local s = settings.startup['PHI-MI-ROBOT'].value / 10 for _, t in pairs({data.raw['construction-robot'], data.raw['logistic-robot']}) do
-- MI C 2 BASE ENTITY
for _, t in pairs({data.raw['construction-robot'], data.raw['logistic-robot']}) do
for _, v in pairs(t) do for _, v in pairs(t) do
v.speed = v.speed * s
if settings.startup['PHI-MI-ROBOT-ENERGY'].value then if settings.startup['PHI-MI-ROBOT-ENERGY'].value then
v.energy_per_tick = (v.energy_per_tick and '0J') or nil 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.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 v.speed_multiplier_when_out_of_energy = (v.speed_multiplier_when_out_of_energy and 1) or nil
end end
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
end
end
end end
-- MI C 1 BASE UTILITY_CONSTANTS -- MI C 1 BASE UTILITY_CONSTANTS
+16 -5
View File
@@ -3,8 +3,7 @@ local items = require 'config'
-- MIG C 1 BASE ARMOR_EQUIPMENT -- MIG C 1 BASE ARMOR_EQUIPMENT
data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true
-- MIG C 3 BASE ENTITY -- MIG C 2 BASE ENTITY
data.raw['inserter']['burner-inserter'].allow_burner_leech = true
data.raw['programmable-speaker']['programmable-speaker'].energy_source.usage_priority = 'primary-input' 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}) 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' v.inventory_type = 'with_filters_and_bar'
end 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 -- MIG C 1 BASE ENTITY
for _, v in pairs(data.raw['reactor']) do for _, v in pairs(data.raw['reactor']) do
v.scale_energy_usage = (v.fast_replaceable_group and v.fast_replaceable_group == 'reactor') v.scale_energy_usage = (v.fast_replaceable_group and v.fast_replaceable_group == 'reactor')
end end
-- MIG C 1 BASE ENTITY -- MIG C 8 BASE ENTITY
for _, v in pairs(data.raw['pump']) do 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
v.pumping_speed = math.max(50, v.pumping_speed) * settings.startup['PHI-MI-PIPE'].value / 10 for _, v in pairs(t) do
v.heating_energy = nil v.heating_energy = nil
end
end end
-- MIG C 2 BASE ENTITY -- 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 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.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'} 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
end end
+2 -20
View File
@@ -96,31 +96,13 @@ data:extend({
maximum_value = 160, 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'}}}, 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' 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', type = 'bool-setting',
name = 'PHI-MI-ROBOT-ENERGY', name = 'PHI-MI-ROBOT-ENERGY',
setting_type = 'startup', setting_type = 'startup',
default_value = false, 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'}}}, 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' order = 'B03'
}, {
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'
}, { }, {
type = 'int-setting', type = 'int-setting',
name = 'PHI-MI-PIPE-EXTENT', name = 'PHI-MI-PIPE-EXTENT',
@@ -129,7 +111,7 @@ data:extend({
minimum_value = 80, minimum_value = 80,
maximum_value = 10240, 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'}}, 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', type = 'bool-setting',
name = 'PHI-SA', name = 'PHI-SA',