This commit is contained in:
2024-10-04 01:31:53 +09:00
parent 00d498713c
commit 6e4a8ac3a0
6 changed files with 128 additions and 256 deletions

View File

@@ -48,8 +48,7 @@ local items = {
ref_name = 'solar-panel',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-SOLAR-TIER'].value,
base = 60
max = settings.startup['PHI-EN-SOLAR-TIER'].value
},
['accumulator'] = {
enabled = settings.startup['PHI-EN'].value,
@@ -59,8 +58,7 @@ local items = {
ref_name = 'accumulator',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-SOLAR-TIER'].value,
base = 5
max = settings.startup['PHI-EN-SOLAR-TIER'].value
},
['boiler'] = {
enabled = settings.startup['PHI-EN'].value,
@@ -70,10 +68,7 @@ local items = {
ref_name = 'boiler',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-STEAM-TIER'].value,
base = 1800,
temp = 150,
fluid = 1
max = settings.startup['PHI-EN-STEAM-TIER'].value
},
['steam-engine'] = {
enabled = settings.startup['PHI-EN'].value,
@@ -83,9 +78,7 @@ local items = {
ref_name = 'steam-engine',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-STEAM-TIER'].value,
base = 150,
fluid = 0.5
max = settings.startup['PHI-EN-STEAM-TIER'].value
},
['nuclear-reactor'] = {
enabled = settings.startup['PHI-EN'].value,
@@ -95,10 +88,7 @@ local items = {
ref_name = 'nuclear-reactor',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-NUCLEAR-TIER'].value,
base = 40,
bonus = 1,
temp = 500
max = settings.startup['PHI-EN-NUCLEAR-TIER'].value
},
['heat-pipe'] = {
enabled = settings.startup['PHI-EN'].value,
@@ -108,8 +98,7 @@ local items = {
ref_name = 'heat-pipe',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-NUCLEAR-TIER'].value,
temp = 500
max = settings.startup['PHI-EN-NUCLEAR-TIER'].value
},
['heat-exchanger'] = {
enabled = settings.startup['PHI-EN'].value,
@@ -119,10 +108,7 @@ local items = {
ref_name = 'heat-exchanger',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-NUCLEAR-TIER'].value,
base = 10000,
temp = 485,
fluid = 103 / 60
max = settings.startup['PHI-EN-NUCLEAR-TIER'].value
},
['steam-turbine'] = {
enabled = settings.startup['PHI-EN'].value,
@@ -132,9 +118,7 @@ local items = {
ref_name = 'steam-turbine',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-NUCLEAR-TIER'].value,
base = 485,
fluid = 1
max = settings.startup['PHI-EN-NUCLEAR-TIER'].value
},
['assembling-machine'] = {
enabled = settings.startup['PHI-MB'].value,
@@ -743,21 +727,6 @@ if mods then
end
if mods['Krastorio2'] then
items['item']['solar-panel'].base = 100
items['item']['accumulator'].base = 10
items['item']['boiler'].base = 1500
items['item']['boiler'].temp = 150
items['item']['boiler'].fluid = 1 / 3
items['item']['steam-engine'].fluid = 1 / 6
items['item']['nuclear-reactor'].base = 250
items['item']['nuclear-reactor'].bonus = 0.25
items['item']['heat-exchanger'].base = 50000
items['item']['heat-exchanger'].temp = 400
items['item']['heat-exchanger'].fluid = 25 / 6
items['item']['steam-turbine'].base = 400
items['item']['steam-turbine'].fluid = 5 / 6
items['item']['heat-pipe'].temp = 400
items['item']['lab'].stage = 2
items['item']['kr-mineral-water-pumpjack'] = {
@@ -779,8 +748,7 @@ if mods then
ref_name = 'kr-gas-power-station',
tech = 'compound-energy',
min = 2,
max = settings.startup['PHI-EN-STEAM-TIER'].value,
base = 0.1
max = settings.startup['PHI-EN-STEAM-TIER'].value
}
items['item']['kr-crusher'] = {
@@ -993,11 +961,6 @@ if mods then
}
end
if (not mods['Krastorio2']) and mods['space-exploration'] then
items['item']['solar-panel'].base = 60
items['item']['accumulator'].base = 5
end
if mods['space-exploration'] then
items['item']['se-space-solar-panel'] = {
enabled = settings.startup['PHI-EN'].value,
@@ -1007,8 +970,7 @@ if mods then
ref_name = 'se-space-solar-panel',
tech = 'compound-energy',
min = 4,
max = settings.startup['PHI-EN-SOLAR-TIER'].value,
base = 400
max = settings.startup['PHI-EN-SOLAR-TIER'].value
}
items['item']['se-space-assembling-machine'] = {

View File

@@ -1,6 +1,6 @@
-- local items = require 'config'
-- local main = require 'main'
-- local file_stage = 3
local items = require 'config'
local main = require 'main'
local file_stage = 3
data.raw['utility-constants'].default.zoom_to_world_effect_strength = 0
data.raw['utility-constants'].default.zoom_to_world_can_use_nightvision = true
@@ -39,46 +39,6 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ARTILLERY'].val
-- data.raw['artillery-projectile']['artillery-projectile'].reveal_map = false
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value then
for k, _ in pairs(data.raw) do
if data.raw[k] then
if data.raw[k].fluid_box then
if data.raw[k].fluid_box.height < settings.startup['PHI-MI-PIPE'].value then
data.raw[k].fluid_box.height = settings.startup['PHI-MI-PIPE'].value
end
if data.raw[k].fluid_box.base_level < (1 + settings.startup['PHI-MI-PIPE'].value) then
data.raw[k].fluid_box.base_level = 1 + settings.startup['PHI-MI-PIPE'].value
end
end
if data.raw[k].output_fluid_box then
if data.raw[k].output_fluid_box.height < settings.startup['PHI-MI-PIPE'].value then
data.raw[k].output_fluid_box.height = settings.startup['PHI-MI-PIPE'].value
end
if data.raw[k].output_fluid_box.base_level > (-1 - settings.startup['PHI-MI-PIPE'].value) then
data.raw[k].output_fluid_box.base_level = (-1 - settings.startup['PHI-MI-PIPE'].value)
end
end
if data.raw[k].fluid_boxes then
for k1, _ in pairs(data.raw[k].fluid_boxes) do
if data.raw[k].fluid_boxes[k1] ~= true and data.raw[k].fluid_boxes[k1] ~= false then
if data.raw[k].fluid_boxes[k1].production_type then
data.raw[k].fluid_boxes[k1].height = settings.startup['PHI-MI-PIPE'].value
if data.raw[k].fluid_boxes[k1].base_level then
data.raw[k].fluid_boxes[k1].base_level = 1 + settings.startup['PHI-MI-PIPE'].value
end
end
end
end
end
end
end
end
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TILE'].value then
for _, tile in pairs (data.raw.tile) do
tile.autoplace = nil
@@ -119,3 +79,13 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TILE'].value th
}
}
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'
for j=v.min, v.max, 1 do
main.EEEC(v, j)
end
end
end

View File

@@ -10,7 +10,14 @@ if settings.startup['PHI-MB'].value then
for i=2, 3 do
item = table.deepcopy(data.raw['item']['satellite'])
item.name = 'satellite-' .. i
item.rocket_launch_product = {type='item', name='space-science-pack', amount=1000 * (2 ^ (i - 1))}
if mods['space-exploration'] then
item.rocket_launch_product = {'se-satellite-telemetry', 100 * (2 ^ (i - 1))}
else
item.rocket_launch_product[2] = item.rocket_launch_product[2] * (2 ^ (i - 1))
end
item.icons = {
{
icon = '__base__/graphics/icons/satellite.png',
@@ -52,6 +59,28 @@ if settings.startup['PHI-MB'].value then
end
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-REPAIR'].value then
for _, v in pairs(data.raw['repair-tool']) do
v.speed = v.speed * settings.startup['PHI-MI-REPAIR'].value
v.durability = v.durability * settings.startup['PHI-MI-REPAIR'].value
end
end
if settings.startup['PHI-MI'].value and (tonumber(settings.startup['PHI-MI-LANDFILL'].value) ~= 20) then
data.raw.recipe['landfill'].ingredients = {
{'stone', tonumber(settings.startup['PHI-MI-LANDFILL'].value)}
}
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-EFFCY'].value then
data.raw['module']['effectivity-module'].effect = {consumption = {bonus = -0.5}, pollution = {bonus = -0.1}}
data.raw['module']['effectivity-module-2'].effect = {consumption = {bonus = -1.0}, pollution = {bonus = -0.15}}
data.raw['module']['effectivity-module-3'].effect = {consumption = {bonus = -1.5}, pollution = {bonus = -0.2}}
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-NUCLEAR'].value then
data.raw['reactor']['nuclear-reactor'].scale_energy_usage = true
end
if settings.startup['PHI-MB'].value and mods['space-exploration'] and settings.startup['PHI-MB-MINING-TIER'].value > 1 then
data.raw['mining-drill']['se-core-miner-drill'].fast_replaceable_group = 'se-core-miner-drill'
@@ -121,7 +150,6 @@ if settings.startup['PHI-MB'].value and mods['space-exploration'] and settings.s
end
end
if settings.startup['PHI-EQ'].value and settings.startup['PHI-EQ-ARMOR'].value then
data:extend({
{

View File

@@ -469,101 +469,6 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRAIN'].value t
data.raw['locomotive']['locomotive'].burner.burnt_inventory_size = 1
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-REPAIR'].value then
data.raw['repair-tool']['repair-pack'].speed = 2 * settings.startup['PHI-MI-REPAIR'].value
data.raw['repair-tool']['repair-pack'].durability = 300 * settings.startup['PHI-MI-REPAIR'].value
end
if settings.startup['PHI-MI'].value and (tonumber(settings.startup['PHI-MI-LANDFILL'].value) ~= 20) then
data.raw.recipe['landfill'].ingredients = {
{'stone', tonumber(settings.startup['PHI-MI-LANDFILL'].value)}
}
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-EFFCY'].value then
data.raw['module']['effectivity-module'].effect = {consumption = {bonus = -0.5}, pollution = {bonus = -0.1}}
data.raw['module']['effectivity-module-2'].effect = {consumption = {bonus = -1.0}, pollution = {bonus = -0.15}}
data.raw['module']['effectivity-module-3'].effect = {consumption = {bonus = -1.5}, pollution = {bonus = -0.2}}
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-NUCLEAR'].value then
data.raw['reactor']['nuclear-reactor'].scale_energy_usage = true
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value then
data.raw['pump']['pump'].fluid_box.height = 4 * settings.startup['PHI-MI-PIPE'].value
data.raw['pump']['pump'].pumping_speed = 200 * settings.startup['PHI-MI-PIPE'].value
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ROBOT'].value > 1 then
data.raw['construction-robot']['construction-robot'].speed = 0.06 * settings.startup['PHI-MI-ROBOT'].value
data.raw['construction-robot']['construction-robot'].max_health = 100 * settings.startup['PHI-MI-ROBOT'].value
data.raw['construction-robot']['construction-robot'].max_payload_size = settings.startup['PHI-MI-ROBOT'].value
data.raw['construction-robot']['construction-robot'].max_energy = (1.5 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ'
data.raw['logistic-robot']['logistic-robot'].speed = 0.06 * settings.startup['PHI-MI-ROBOT'].value
data.raw['logistic-robot']['logistic-robot'].max_health = 100 * settings.startup['PHI-MI-ROBOT'].value
data.raw['logistic-robot']['logistic-robot'].max_payload_size = settings.startup['PHI-MI-ROBOT'].value
data.raw['logistic-robot']['logistic-robot'].max_energy = (1.5 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ'
data.raw['roboport']['roboport'].max_health = 500 * settings.startup['PHI-MI-ROBOT'].value
data.raw['roboport']['roboport'].energy_usage = 50 * settings.startup['PHI-MI-ROBOT'].value .. 'kW'
data.raw['roboport']['roboport'].energy_source.input_flow_limit = (10 * settings.startup['PHI-MI-ROBOT'].value) .. 'MW'
data.raw['roboport']['roboport'].energy_source.buffer_capacity = (200 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ'
data.raw['roboport']['roboport'].recharge_minimum = (40 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ'
data.raw['roboport']['roboport'].charging_energy = (5 * settings.startup['PHI-MI-ROBOT'].value) .. 'MW'
data.raw['roboport']['roboport'].material_slots_count = 2
-- data.raw['roboport']['roboport'].logistics_radius = 25
-- data.raw['roboport']['roboport'].construction_radius = 55
data.raw['roboport']['roboport'].charging_offsets = {
{-1.5, -0.5},
{1.5, -0.5},
{1.5, 1.5},
{-1.5, 1.5},
{-2.5, -1.5},
{2.5, -1.5},
{2.5, 2.5},
{-2.5, 2.5}
}
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-TRAIN'].value > 1 then
local lo = 'locomotive'
data.raw[lo][lo].max_health = 250 * (3 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[lo][lo].max_speed = 0.3 * (3 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[lo][lo].max_power = 300 * (1 + settings.startup['PHI-MI-TRAIN'].value) .. 'kW'
data.raw[lo][lo].reversing_power_modifier = 1
data.raw[lo][lo].energy_per_hit_point = 2.5 * (1 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[lo][lo].braking_force = 1.25 * (7 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[lo][lo].friction_force = 0.50 - (0.05 * settings.startup['PHI-MI-TRAIN'].value)
data.raw[lo][lo].air_resistance = 0.0075 - (0.0007 * settings.startup['PHI-MI-TRAIN'].value)
data.raw[lo][lo].burner.effectivity = 0.10 * (9 + settings.startup['PHI-MI-TRAIN'].value)
local cw = 'cargo-wagon'
data.raw[cw][cw].max_health = 200 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[cw][cw].max_speed = 0.6 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[cw][cw].braking_force = 1 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[cw][cw].friction_force = 0.50 - (0.05 * settings.startup['PHI-MI-TRAIN'].value)
data.raw[cw][cw].air_resistance = 0.01 - (0.001 * settings.startup['PHI-MI-TRAIN'].value)
data.raw[cw][cw].inventory_size = 5 * (7 + settings.startup['PHI-MI-TRAIN'].value)
local fw = 'fluid-wagon'
data.raw[fw][fw].max_health = 200 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[fw][fw].max_speed = 0.6 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[fw][fw].braking_force = 1 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[fw][fw].friction_force = 0.50 - (0.05 * settings.startup['PHI-MI-TRAIN'].value)
data.raw[fw][fw].air_resistance = 0.01 - (0.001 * settings.startup['PHI-MI-TRAIN'].value)
data.raw[fw][fw].capacity = 3125 * (7 + settings.startup['PHI-MI-TRAIN'].value)
local aw = 'artillery-wagon'
data.raw[aw][aw].max_health = 200 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[aw][aw].max_speed = 0.6 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[aw][aw].braking_force = 1 * (2 + settings.startup['PHI-MI-TRAIN'].value)
data.raw[aw][aw].friction_force = 0.50 - (0.05 * settings.startup['PHI-MI-TRAIN'].value)
data.raw[aw][aw].air_resistance = 0.015 - (0.0015 * settings.startup['PHI-MI-TRAIN'].value)
data.raw[aw][aw].turret_rotation_speed = 0.0005 * (1 + settings.startup['PHI-MI-TRAIN'].value)
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-BOILER'].value then
local item = table.deepcopy(data.raw['item']['boiler'])
item.name = 'electric-boiler'

View File

@@ -48,6 +48,10 @@ end
function main.EEE(source, tier)
local item = table.deepcopy(data.raw[source.type][source.ref_name])
if not item then
return
end
item.name = source.name .. '-' .. tier
item.minable.result = item.name
item.max_health = item.max_health * (tier - source.min + 2)
@@ -80,27 +84,11 @@ function main.EEE(source, tier)
end
end
if settings.startup['PHI-MI-PIPE'].value then
if item.fluid_boxes then
for k, _ in pairs(item.fluid_boxes) do
if (item.fluid_boxes[k] and (not item.fluid_boxes[k])) then
if item.fluid_boxes[k].production_type then
item.fluid_boxes[k].height = settings.startup['PHI-MI-PIPE'].value
if item.fluid_boxes[k].base_level then
item.fluid_boxes[k].base_level = item.fluid_boxes[k].base_level + settings.startup['PHI-MI-PIPE'].value
end
end
end
end
end
end
if source.tech == 'compound-energy' then
if (source.type == 'accumulator') then
item.energy_source.buffer_capacity = (source.base * 4 ^ (tier - source.min + 1)) .. 'MJ'
item.energy_source.input_flow_limit = (source.base * 60 * (4 ^ (tier - source.min + 1))) .. 'kW'
item.energy_source.output_flow_limit = (source.base * 60 * (4 ^ (tier - source.min + 1))) .. 'kW'
item.energy_source.buffer_capacity = tostring(tonumber(string.match(item.energy_source.buffer_capacity, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.energy_source.buffer_capacity, '%a+')
item.energy_source.input_flow_limit = tostring(tonumber(string.match(item.energy_source.input_flow_limit, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.energy_source.input_flow_limit, '%a+')
item.energy_source.output_flow_limit = tostring(tonumber(string.match(item.energy_source.output_flow_limit, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.energy_source.output_flow_limit, '%a+')
for _, v in pairs({'charge_animation', 'discharge_animation'}) do
if item[v] and item[v].layers then
@@ -124,54 +112,47 @@ function main.EEE(source, tier)
elseif (source.type == 'solar-panel') then
if (source.ref_name == 'solar-panel') then
item.production = (source.base * (4 ^ (tier - source.min + 1))) .. 'kW'
item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.production, '%a+')
elseif (source.ref_name == 'se-space-solar-panel') then
item.production = (source.base * (4 ^ (tier - source.min + 2))) .. 'kW'
item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 2))) .. string.match(item.production, '%a+')
end
elseif (source.type == 'boiler') then
if settings.startup['PHI-MI-PIPE'].value then
item.fluid_box.height = settings.startup['PHI-MI-PIPE'].value
item.output_fluid_box.height = settings.startup['PHI-MI-PIPE'].value
item.output_fluid_box.base_level = item.output_fluid_box.base_level + settings.startup['PHI-MI-PIPE'].value
end
item.energy_consumption = source.base * tier .. 'kW'
item.target_temperature = 15 + (source.temp * tier)
item.fluid_usage_per_tick = source.fluid
item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * tier) .. string.match(item.energy_consumption, '%a+')
if (source.name == 'heat-exchanger') then
item.energy_source.min_working_temperature = 15 + (source.temp * tier)
item.energy_source.max_temperature = source.temp * (tier + 1)
item.energy_source.max_transfer = 2000 + (2000 * tier) .. 'MW'
item.target_temperature = 15 + (485 * tier)
item.energy_source.min_working_temperature = 15 + (485 * tier)
item.energy_source.max_temperature = math.ceil(item.energy_source.max_temperature / 2 * (tier + 1))
item.energy_source.max_transfer = tostring(tonumber(string.match(item.energy_source.max_transfer, '[%d%.]+')) * tier) .. string.match(item.energy_source.max_transfer, '%a+')
else
item.target_temperature = 15 + (150 * tier)
end
elseif (source.type == 'generator') then
if settings.startup['PHI-MI-PIPE'].value then
item.fluid_box.height = settings.startup['PHI-MI-PIPE'].value
end
if source.name == 'kr-gas-power-station' then
item.fluid_usage_per_tick = source.base * tier
item.max_power_output = (tonumber(string.match(item.max_power_output, '[%d%.]+')) * (tier - source.min + 2)) .. 'kW'
elseif (source.name == 'steam-turbine') then
item.maximum_temperature = 15 + (485 * tier)
else
item.maximum_temperature = 15 + (source.base * tier)
item.fluid_usage_per_tick = source.fluid
item.maximum_temperature = 15 + (150 * tier)
end
elseif (source.type == 'reactor') then
item.consumption = source.base * tier .. 'MW'
item.neighbour_bonus = source.bonus
item.heat_buffer.max_temperature = source.temp * (tier + 1)
item.heat_buffer.max_transfer = source.temp * (tier + 1) * 0.02 .. 'GW'
item.consumption = tostring(tonumber(string.match(item.consumption, '[%d%.]+')) * tier) .. string.match(item.consumption, '%a+')
item.heat_buffer.max_temperature = math.ceil(item.heat_buffer.max_temperature / 2 * (tier + 1))
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * (tier + 1)) .. string.match(item.heat_buffer.max_transfer, '%a+')
tint_handle(item, tier, {'connection_patches_connected', 'connection_patches_disconnected', 'heat_connection_patches_connected', 'heat_connection_patches_disconnected', 'lower_layer_picture'})
elseif (source.type == 'heat-pipe') then
item.heat_buffer.max_temperature = source.temp * (tier + 1)
item.heat_buffer.max_transfer = source.temp * (tier + 1) * 0.01 .. 'GW'
item.heat_buffer.max_temperature = math.ceil(item.heat_buffer.max_temperature / 2 * (tier + 1))
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * (tier + 1)) .. string.match(item.heat_buffer.max_transfer, '%a+')
tint_handle(item, tier, {'connection_sprites', 'heat_glow_sprites'})
end
@@ -400,6 +381,10 @@ end
function main.EI(source, tier)
local item = table.deepcopy(data.raw.item[source.ref_name])
if not item then
return
end
if source.category == 'equipment' then
item['name'] = source.name .. '-mk' .. tier .. '-equipment'
item.placed_as_equipment_result = source.name .. '-mk' .. tier .. '-equipment'
@@ -577,6 +562,10 @@ end
-- fast replace group
function main.EL(source)
if not data.raw[source.type][source.ref_name] then
return
end
if not data.raw[source.type][source.ref_name].fast_replaceable_group then
data.raw[source.type][source.ref_name].fast_replaceable_group = source.ref_name
end
@@ -592,4 +581,43 @@ function main.EL(source)
end
end
-- entity category
function main.EEEC(source, tier)
local category_name = source.type
if source.name == 'electric-filter-furnace' then
category_name = 'assembling-machine'
end
local item_name = source.name .. '-' .. tier
if not data.raw[category_name][source.ref_name] then
return
end
if data.raw[category_name][source.ref_name].crafting_categories then
data.raw[category_name][item_name].crafting_categories = {}
for i=1, #data.raw[category_name][source.ref_name].crafting_categories do
table.insert(data.raw[category_name][item_name].crafting_categories, data.raw[category_name][source.ref_name].crafting_categories[i])
end
end
if data.raw[category_name][source.ref_name].resource_categories then
data.raw[category_name][item_name].resource_categories = {}
for i=1, #data.raw[category_name][source.ref_name].resource_categories do
table.insert(data.raw[category_name][item_name].resource_categories, data.raw[category_name][source.ref_name].resource_categories[i])
end
end
if data.raw[category_name][source.ref_name].fuel_categories then
data.raw[category_name][item_name].fuel_categories = table.deepcopy(data.raw[category_name][source.ref_name].fuel_categories)
end
if data.raw[category_name][source.ref_name].allowed_effects then
data.raw[category_name][item_name].allowed_effects = table.deepcopy(data.raw[category_name][source.ref_name].allowed_effects)
end
end
return main

View File

@@ -221,33 +221,12 @@ data:extend({
default_value = 1,
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
order = 'E06'
}, {
type = 'int-setting',
name = 'PHI-MI-PIPE',
setting_type = 'startup',
default_value = 1,
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
order = 'E07'
}, {
type = 'int-setting',
name = 'PHI-MI-ROBOT',
setting_type = 'startup',
default_value = 1,
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
order = 'E08'
}, {
type = 'int-setting',
name = 'PHI-MI-TRAIN',
setting_type = 'startup',
default_value = 1,
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
order = 'E09'
}, {
type = 'bool-setting',
name = 'PHI-MI-ARTILLERY',
setting_type = 'startup',
default_value = true,
order = 'E10'
order = 'E07'
}, {
type = 'bool-setting',
name = 'PHI-RS',