mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -1,63 +1,25 @@
|
||||
-- accumulator
|
||||
data.raw['accumulator']['accumulator'].fast_replaceable_group = 'accumulator'
|
||||
data.raw['accumulator']['accumulator-2'].fast_replaceable_group = data.raw['accumulator']['accumulator'].fast_replaceable_group
|
||||
data.raw['accumulator']['accumulator-3'].fast_replaceable_group = data.raw['accumulator']['accumulator-2'].fast_replaceable_group
|
||||
data.raw['accumulator']['accumulator-4'].fast_replaceable_group = data.raw['accumulator']['accumulator-3'].fast_replaceable_group
|
||||
data.raw['accumulator']['accumulator-5'].fast_replaceable_group = data.raw['accumulator']['accumulator-4'].fast_replaceable_group
|
||||
data.raw['accumulator']['accumulator-6'].fast_replaceable_group = data.raw['accumulator']['accumulator-5'].fast_replaceable_group
|
||||
data.raw['accumulator']['accumulator-7'].fast_replaceable_group = data.raw['accumulator']['accumulator-6'].fast_replaceable_group
|
||||
data.raw['accumulator']['accumulator-8'].fast_replaceable_group = data.raw['accumulator']['accumulator-7'].fast_replaceable_group
|
||||
local items = require 'config'
|
||||
|
||||
-- solar-panel
|
||||
data.raw['solar-panel']['solar-panel'].fast_replaceable_group = 'solar-panel'
|
||||
data.raw['solar-panel']['solar-panel-2'].fast_replaceable_group = data.raw['solar-panel']['solar-panel'].fast_replaceable_group
|
||||
data.raw['solar-panel']['solar-panel-3'].fast_replaceable_group = data.raw['solar-panel']['solar-panel-2'].fast_replaceable_group
|
||||
data.raw['solar-panel']['solar-panel-4'].fast_replaceable_group = data.raw['solar-panel']['solar-panel-3'].fast_replaceable_group
|
||||
data.raw['solar-panel']['solar-panel-5'].fast_replaceable_group = data.raw['solar-panel']['solar-panel-4'].fast_replaceable_group
|
||||
data.raw['solar-panel']['solar-panel-6'].fast_replaceable_group = data.raw['solar-panel']['solar-panel-5'].fast_replaceable_group
|
||||
data.raw['solar-panel']['solar-panel-7'].fast_replaceable_group = data.raw['solar-panel']['solar-panel-6'].fast_replaceable_group
|
||||
data.raw['solar-panel']['solar-panel-8'].fast_replaceable_group = data.raw['solar-panel']['solar-panel-7'].fast_replaceable_group
|
||||
for k, v in pairs(items['setting']) do
|
||||
for k2=1, #v.effect do
|
||||
items[v.effect[k2]][v.type] = settings.startup[k].value
|
||||
end
|
||||
end
|
||||
|
||||
-- boiler
|
||||
data.raw['boiler']['boiler'].fast_replaceable_group = 'boiler'
|
||||
data.raw['boiler']['boiler-2'].fast_replaceable_group = data.raw['boiler']['boiler'].fast_replaceable_group
|
||||
data.raw['boiler']['boiler-3'].fast_replaceable_group = data.raw['boiler']['boiler-2'].fast_replaceable_group
|
||||
data.raw['boiler']['boiler-4'].fast_replaceable_group = data.raw['boiler']['boiler-3'].fast_replaceable_group
|
||||
data.raw['boiler']['boiler-5'].fast_replaceable_group = data.raw['boiler']['boiler-4'].fast_replaceable_group
|
||||
for k, v in pairs(items) do
|
||||
if k ~= 'setting' then
|
||||
if v.enabled then
|
||||
data.raw[v.type][v.ref_name].fast_replaceable_group = v.type
|
||||
|
||||
-- steam-engine
|
||||
data.raw['generator']['steam-engine'].fast_replaceable_group = 'steam-engine'
|
||||
data.raw['generator']['steam-engine-2'].fast_replaceable_group = data.raw['generator']['steam-engine'].fast_replaceable_group
|
||||
data.raw['generator']['steam-engine-3'].fast_replaceable_group = data.raw['generator']['steam-engine-2'].fast_replaceable_group
|
||||
data.raw['generator']['steam-engine-4'].fast_replaceable_group = data.raw['generator']['steam-engine-3'].fast_replaceable_group
|
||||
data.raw['generator']['steam-engine-5'].fast_replaceable_group = data.raw['generator']['steam-engine-4'].fast_replaceable_group
|
||||
if v.max > 2 then
|
||||
data.raw[v.type][v.name .. '-' .. 2].fast_replaceable_group = data.raw[v.type][v.ref_name].fast_replaceable_group
|
||||
end
|
||||
|
||||
-- nuclear-reactor
|
||||
data.raw['reactor']['nuclear-reactor'].fast_replaceable_group = 'reactor'
|
||||
data.raw['reactor']['nuclear-reactor-2'].fast_replaceable_group = data.raw['reactor']['nuclear-reactor'].fast_replaceable_group
|
||||
data.raw['reactor']['nuclear-reactor-3'].fast_replaceable_group = data.raw['reactor']['nuclear-reactor-2'].fast_replaceable_group
|
||||
data.raw['reactor']['nuclear-reactor-4'].fast_replaceable_group = data.raw['reactor']['nuclear-reactor-3'].fast_replaceable_group
|
||||
data.raw['reactor']['nuclear-reactor-5'].fast_replaceable_group = data.raw['reactor']['nuclear-reactor-4'].fast_replaceable_group
|
||||
|
||||
-- heat-pipe
|
||||
data.raw['heat-pipe']['heat-pipe'].fast_replaceable_group = 'heat-pipe'
|
||||
data.raw['heat-pipe']['heat-pipe-2'].fast_replaceable_group = data.raw['heat-pipe']['heat-pipe'].fast_replaceable_group
|
||||
data.raw['heat-pipe']['heat-pipe-3'].fast_replaceable_group = data.raw['heat-pipe']['heat-pipe-2'].fast_replaceable_group
|
||||
data.raw['heat-pipe']['heat-pipe-4'].fast_replaceable_group = data.raw['heat-pipe']['heat-pipe-3'].fast_replaceable_group
|
||||
data.raw['heat-pipe']['heat-pipe-5'].fast_replaceable_group = data.raw['heat-pipe']['heat-pipe-4'].fast_replaceable_group
|
||||
|
||||
-- heat-exchanger
|
||||
data.raw['boiler']['heat-exchanger'].fast_replaceable_group = 'heat-exchanger'
|
||||
data.raw['boiler']['heat-exchanger-2'].fast_replaceable_group = data.raw['boiler']['heat-exchanger'].fast_replaceable_group
|
||||
data.raw['boiler']['heat-exchanger-3'].fast_replaceable_group = data.raw['boiler']['heat-exchanger-2'].fast_replaceable_group
|
||||
data.raw['boiler']['heat-exchanger-4'].fast_replaceable_group = data.raw['boiler']['heat-exchanger-3'].fast_replaceable_group
|
||||
data.raw['boiler']['heat-exchanger-5'].fast_replaceable_group = data.raw['boiler']['heat-exchanger-4'].fast_replaceable_group
|
||||
|
||||
-- steam-turbine
|
||||
data.raw['generator']['steam-turbine'].fast_replaceable_group = 'steam-engine'
|
||||
data.raw['generator']['steam-turbine-2'].fast_replaceable_group = data.raw['generator']['steam-turbine'].fast_replaceable_group
|
||||
data.raw['generator']['steam-turbine-3'].fast_replaceable_group = data.raw['generator']['steam-turbine-2'].fast_replaceable_group
|
||||
data.raw['generator']['steam-turbine-4'].fast_replaceable_group = data.raw['generator']['steam-turbine-3'].fast_replaceable_group
|
||||
data.raw['generator']['steam-turbine-5'].fast_replaceable_group = data.raw['generator']['steam-turbine-4'].fast_replaceable_group
|
||||
|
||||
data.raw['fluid']['steam'].max_temperature = 5000
|
||||
if v.max > v.min then
|
||||
for j=v.min + 1, v.max do
|
||||
data.raw[v.type][v.name .. '-' .. j].fast_replaceable_group = data.raw[v.type][v.name .. '-' .. (j - 1)].fast_replaceable_group
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user