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
+8 -53
View File
@@ -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
+17 -6
View File
@@ -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