This commit is contained in:
2025-06-20 22:02:23 +09:00
parent 1dab9b6768
commit 6afae76ffd

View File

@@ -23,8 +23,6 @@ if settings.startup['PHI-MB'].value and settings.startup['PHI-MB-ENERGY'].value
end
if settings.startup['PHI-MB-EQUIPMENT'].value and settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
local an_m = false
local grid = table.deepcopy(data.raw['equipment-grid']['large-equipment-grid'])
grid.name = 'equipment-grid-14x14'
grid.width = 14
@@ -68,8 +66,6 @@ if settings.startup['PHI-MB-EQUIPMENT'].value and settings.startup['PHI-MB-EQUIP
table.insert(data.raw.technology['power-armor-mk2'].effects, {type = 'unlock-recipe', recipe = armor.name})
if mods['space-age'] then
an_m = true
armor = table.deepcopy(data.raw['armor']['mech-armor'])
armor.name = 'mech-armor-mk2'
armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}}
@@ -172,6 +168,7 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett
data:extend({{type = 'recipe-category', name = 'fluid'}})
if data.raw['offshore-pump']['offshore-pump'] then
local item = table.deepcopy(data.raw['item']['offshore-pump'])
item.name = 'super-pump'
item.place_result = item.name
@@ -222,6 +219,7 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett
main_product = item.name,
localised_name = {'', {'name.super-entity'}, {'entity-name.pump'}}
}})
end
if data.raw.fluid['water'] then
data:extend({{
@@ -252,7 +250,7 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett
end
if mods['elevated-rails'] then
entity = table.deepcopy(data.raw['electric-pole']['big-electric-pole'])
local entity = table.deepcopy(data.raw['electric-pole']['big-electric-pole'])
entity.name = 'rail-support-pole-electric'
entity.hidden = true
entity.hidden_in_factoriopedia = true
@@ -290,6 +288,345 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett
data:extend({entity})
end
end
local vir_sig = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
local s = {}
for i = 1, #vir_sig do
local char = vir_sig:sub(i, i)
table.insert(s, {
type = 'virtual-signal',
name = char .. 'A',
icon = items['general']['graphics_location'] .. 'signal/signal_' .. char .. '.png',
subgroup = string.match(char, '%d') and 'virtual-signal-number' or 'virtual-signal-letter',
order = (string.match(char, '%d') and 'b[numbers]2-[' or 'c[letters]2-[') .. char .. ']',
localised_name = {'phi-cl.combine', {'virtual-signal-name.signal-' .. char}, '(II)'}
})
end
data:extend(s)
if data.raw['container']['steel-chest'] then
local item = table.deepcopy(data.raw['item']['steel-chest'])
item.name = 'trash-chest'
item.place_result = item.name
item.subgroup = 'storage'
item.order = 'b[storage]-h[trash-chest]'
item.icons = {{icon = item.icon or '__base__/graphics/icons/steel-chest.png', tint = items['tint'][8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
item.icon = nil
item.icon_size = nil
item.icon_mipmaps = nil
item.localised_name = {'', {'name.trash-entity'}, {'entity-name.steel-chest'}}
data:extend({item})
local entity = table.deepcopy(data.raw['container']['steel-chest'])
entity.name = item.name
entity.minable.result = item.name
entity.inventory_type = 'with_filters_and_bar'
entity.inventory_size = 1
entity.max_logistic_slots = 0
entity.trash_inventory_size = 0
entity.type = 'infinity-container'
entity.gui_mode = 'none'
entity.erase_contents_when_mined = true
entity.preserve_contents_when_created = true
entity.quality_affects_inventory_size = false
entity.logistic_mode = nil
entity.next_upgrade = nil
entity.surface_conditions = nil
entity.picture.layers[1].tint = items['tint'][8]
entity.localised_name = {'', {'name.trash-entity'}, {'entity-name.steel-chest'}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'steel-chest', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.trash-entity'}, {'entity-name.steel-chest'}}
}})
table.insert(data.raw.technology['steel-processing'].effects, {type = 'unlock-recipe', recipe = item.name})
end
if data.raw['pipe']['pipe'] then
local item = table.deepcopy(data.raw['item']['pipe'])
item.name = 'trash-pipe'
item.place_result = item.name
item.subgroup = 'energy-pipe-distribution'
item.order = 'a[pipe]-c[trash-pipe]'
item.icons = {{icon = item.icon or '__base__/graphics/icons/pipe.png', tint = items['tint'][8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
item.icon = nil
item.icon_size = nil
item.icon_mipmaps = nil
item.localised_name = {'', {'name.trash-entity'}, {'entity-name.pipe'}}
data:extend({item})
local entity = table.deepcopy(data.raw['pipe']['pipe'])
entity.name = item.name
entity.minable.result = item.name
entity.type = 'infinity-pipe'
entity.gui_mode = 'none'
entity.erase_contents_when_mined = true
entity.next_upgrade = nil
for _, v in pairs(entity.pictures) do
v.tint = items['tint'][8]
if v.hr_version then
v.hr_version.tint = items['tint'][8]
end
end
entity.localised_name = {'', {'name.trash-entity'}, {'entity-name.pipe'}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'iron-plate', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.trash-entity'}, {'entity-name.pipe'}}
}})
table.insert(data.raw.technology['automation'].effects, {type = 'unlock-recipe', recipe = item.name})
end
if data.raw['boiler']['boiler'] then
local item = table.deepcopy(data.raw['item']['boiler'])
item.name = 'electric-boiler'
item.place_result = item.name
item.subgroup = 'energy'
item.order = 'b[steam-power]-a[electric-boiler]'
item.localised_name = {'', {'name.electric-entity'}, {'entity-name.boiler'}}
data:extend({item})
local entity = table.deepcopy(data.raw['boiler']['boiler'])
entity.name = item.name
entity.energy_consumption = '7200kW'
entity.buffer_capacity = '14400kJ'
entity.target_temperature = 165
entity.emissions_per_minute = {pollution = 0}
entity.minable.result = entity.name
entity.energy_source = {
type = 'electric',
usage_priority = 'secondary-input',
buffer_capacity = entity.buffer_capacity,
light_flicker = {
color = {r = 0.5, g = 1, b = 1, a = 0.5},
minimum_light_size = 0.1,
light_intensity_to_size_coefficient = 1
}
}
entity.fire_flicker_enabled = false
entity.fire_glow_flicker_enabled = false
entity.fire = {}
entity.localised_name = {'', {'name.electric-entity'}, {'entity-name.boiler'}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = true,
ingredients = {{type = 'item', name = 'boiler', amount = 1}, {type = 'item', name = 'electronic-circuit', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.electric-entity'}, {'entity-name.boiler'}}
}})
data.raw['boiler']['boiler'].fast_replaceable_group = 'boiler'
data.raw['boiler']['electric-boiler'].fast_replaceable_group = data.raw['boiler']['boiler'].fast_replaceable_group
end
if data.raw['reactor']['heating-tower'] then
local item = table.deepcopy(data.raw['item']['heating-tower'])
item.name = 'electric-heating-tower'
item.place_result = item.name
item.subgroup = 'environmental-protection'
item.order = 'c[heating-tower]-e'
item.localised_name = {'', {'name.electric-entity'}, {'entity-name.heating-tower'}}
data:extend({item})
local entity = table.deepcopy(data.raw['reactor']['heating-tower'])
entity.name = item.name
entity.consumption = '160MW'
entity.buffer_capacity = '320MJ'
entity.heat_buffer.max_temperature = 500
entity.scale_energy_usage = true
entity.minable.result = entity.name
entity.energy_source = {
type = 'electric',
usage_priority = 'secondary-input',
buffer_capacity = entity.buffer_capacity,
light_flicker = {
color = {r = 0.5, g = 1, b = 1, a = 0.5},
minimum_light_size = 0.1,
light_intensity_to_size_coefficient = 1
}
}
entity.localised_name = {'', {'name.electric-entity'}, {'entity-name.heating-tower'}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'heating-tower', amount = 1}, {type = 'item', name = 'electronic-circuit', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.electric-entity'}, {'entity-name.heating-tower'}}
}})
data.raw['reactor']['heating-tower'].fast_replaceable_group = 'heating-tower'
data.raw['reactor']['electric-heating-tower'].fast_replaceable_group = data.raw['reactor']['heating-tower'].fast_replaceable_group
table.insert(data.raw.technology['heating-tower'].effects, {type = 'unlock-recipe', recipe = item.name})
end
for _, c in pairs({'steel-chest', 'passive-provider-chest', 'active-provider-chest', 'storage-chest', 'buffer-chest', 'requester-chest'}) do
if (c == 'steel-chest' and data.raw['container'][c]) or data.raw['logistic-container'][c] then
local item = table.deepcopy(data.raw['item'][c])
item.name = 'basic-' .. c
item.place_result = item.name
item.subgroup = 'storage'
item.order = 'b[storage]-h[basic-' .. c .. ']'
item.localised_name = {'', {'name.basic-entity'}, {'entity-name.' .. c}}
data:extend({item})
local entity = (c == 'steel-chest' and table.deepcopy(data.raw['container'][c])) or table.deepcopy(data.raw['logistic-container'][c])
entity.name = item.name
entity.minable.result = item.name
entity.inventory_type = 'with_filters_and_bar'
entity.inventory_size = 1
entity.quality_affects_inventory_size = false
entity.max_logistic_slots = (c == 'steel-chest' and nil) or 1
entity.trash_inventory_size = (c == 'steel-chest' and nil) or 1
entity.localised_name = {'', {'name.basic-entity'}, {'entity-name.' .. c}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name =c, amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.basic-entity'}, {'entity-name.' .. c}}
}})
end
end
if data.raw.recipe['basic-steel-chest'] then
table.insert(data.raw.technology['steel-processing'].effects, {type = 'unlock-recipe', recipe = 'basic-steel-chest'})
end
for _, t in pairs({'construction', 'logistic'}) do
for _, r in pairs({'passive-provider', 'storage'}) do
if data.raw.recipe['basic-' .. r .. '-chest'] then
table.insert(data.raw.technology[t .. '-robotics'].effects, {type = 'unlock-recipe', recipe = 'basic-' .. r .. '-chest'})
end
end
end
for _, r in pairs({'active-provider', 'buffer', 'requester'}) do
if data.raw.recipe['basic-' .. r .. '-chest'] then
table.insert(data.raw.technology['logistic-system'].effects, {type = 'unlock-recipe', recipe = 'basic-' .. r .. '-chest'})
end
end
for _, l in pairs({'loader', 'fast-loader', 'express-loader', 'turbo-loader'}) do
if data.raw.recipe[l] and data.raw['loader'][l] then
data.raw.item[l].hidden = false
data.raw.item[l].hidden_in_factoriopedia = false
data.raw.recipe[l].hidden = false
data.raw.recipe[l].hidden_in_factoriopedia = false
data.raw['loader'][l].filter_count = 2
data.raw['loader'][l].per_lane_filters = true
data.raw['loader'][l].adjustable_belt_stack_size = (data.raw['inserter']['stack-inserter'] and true) or false
data.raw['loader'][l].max_belt_stack_size = (data.raw['inserter']['stack-inserter'] and data.raw['inserter']['stack-inserter'].max_belt_stack_size) or 1
end
end
if data.raw['loader']['loader'] and data.raw['loader']['fast-loader'] and data.raw['loader']['express-loader'] then
table.insert(data.raw.technology['logistics'].effects, {type = 'unlock-recipe', recipe = 'loader'})
table.insert(data.raw.technology['logistics-2'].effects, {type = 'unlock-recipe', recipe = 'fast-loader'})
table.insert(data.raw.technology['logistics-3'].effects, {type = 'unlock-recipe', recipe = 'express-loader'})
end
if data.raw['loader']['loader'] and data.raw['loader']['turbo-loader'] then
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type = 'unlock-recipe', recipe = 'turbo-loader'})
end
for _, v in pairs({'underground-belt', 'fast-underground-belt', 'express-underground-belt', 'turbo-underground-belt'}) do
if data.raw.item[v] then
local item = table.deepcopy(data.raw.item[v])
item.name = v .. '-a'
item.place_result = item.name
item.localised_name = {'phi-cl.combine', {'entity-name.' .. v}, '(II)'}
item.localised_description = {'entity-description.' .. v}
data:extend({item})
local entity = table.deepcopy(data.raw['underground-belt'][v])
entity.name = item.name
entity.minable.result = item.name
entity.next_upgrade = nil
entity.surface_conditions = nil
entity.localised_name = {'phi-cl.combine', {'entity-name.' .. v}, '(II)'}
entity.localised_description = {'entity-description.' .. v}
for _, st in pairs({'direction_in', 'direction_out', 'direction_in_side_loading', 'direction_out_side_loading'}) do
entity.structure[st].sheet.filename = items['general']['graphics_location'] .. v .. '.png'
entity.structure[st].sheet.width = 106
entity.structure[st].sheet.height = 85
entity.structure[st].sheetshift = {0.15625, 0.0703125}
end
entity.structure.direction_in.sheet.y = 85
entity.structure.direction_out.sheet.y = nil
entity.structure.direction_in_side_loading.sheet.y = 85
entity.structure.direction_out_side_loading.sheet.y = nil
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = v, amount = 2}},
results = {{type = 'item', name = item.name, amount = 2}},
main_product = item.name,
hide_from_player_crafting = true,
allow_productivity = false,
localised_name = {'phi-cl.combine', {'entity-name.' .. v}, '(II)'}
}})
end
end
if data.raw['underground-belt']['underground-belt'] and data.raw['underground-belt']['fast-underground-belt'] and data.raw['underground-belt']['express-underground-belt'] then
data.raw['underground-belt']['underground-belt-a'].next_upgrade = 'fast-underground-belt-a'
data.raw['underground-belt']['fast-underground-belt-a'].next_upgrade = 'express-underground-belt-a'
table.insert(data.raw.technology['logistics'].effects, {type = 'unlock-recipe', recipe = 'underground-belt-a'})
table.insert(data.raw.technology['logistics-2'].effects, {type = 'unlock-recipe', recipe = 'fast-underground-belt-a'})
table.insert(data.raw.technology['logistics-3'].effects, {type = 'unlock-recipe', recipe = 'express-underground-belt-a'})
end
if data.raw['underground-belt']['underground-belt'] and data.raw['underground-belt']['turbo-underground-belt'] then
data.raw['underground-belt']['express-underground-belt-a'].next_upgrade = 'turbo-underground-belt-a'
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type = 'unlock-recipe', recipe = 'turbo-underground-belt-a'})
end
data.raw['proxy-container']['proxy-container'].flags = {'not-blueprintable', 'hide-alt-info', 'not-deconstructable', 'not-flammable', 'not-on-map', 'placeable-off-grid', 'placeable-player', 'no-automated-item-insertion', 'no-automated-item-removal'}
data.raw['proxy-container']['proxy-container'].draw_inventory_content = false
end
if settings.startup['PHI-MI'].value then
@@ -1331,347 +1668,6 @@ if settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'VP'
end
end
if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value ~= '') then
local vir_sig = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
local s = {}
for i = 1, #vir_sig do
local char = vir_sig:sub(i, i)
table.insert(s, {
type = 'virtual-signal',
name = char .. 'A',
icon = items['general']['graphics_location'] .. 'signal/signal_' .. char .. '.png',
subgroup = string.match(char, '%d') and 'virtual-signal-number' or 'virtual-signal-letter',
order = (string.match(char, '%d') and 'b[numbers]2-[' or 'c[letters]2-[') .. char .. ']',
localised_name = {'phi-cl.combine', {'virtual-signal-name.signal-' .. char}, '(II)'}
})
end
data:extend(s)
if data.raw['container']['steel-chest'] then
local item = table.deepcopy(data.raw['item']['steel-chest'])
item.name = 'trash-chest'
item.place_result = item.name
item.subgroup = 'storage'
item.order = 'b[storage]-h[trash-chest]'
item.icons = {{icon = item.icon or '__base__/graphics/icons/steel-chest.png', tint = items['tint'][8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
item.icon = nil
item.icon_size = nil
item.icon_mipmaps = nil
item.localised_name = {'', {'name.trash-entity'}, {'entity-name.steel-chest'}}
data:extend({item})
local entity = table.deepcopy(data.raw['container']['steel-chest'])
entity.name = item.name
entity.minable.result = item.name
entity.inventory_type = 'with_filters_and_bar'
entity.inventory_size = 1
entity.max_logistic_slots = 0
entity.trash_inventory_size = 0
entity.type = 'infinity-container'
entity.gui_mode = 'none'
entity.erase_contents_when_mined = true
entity.preserve_contents_when_created = true
entity.quality_affects_inventory_size = false
entity.logistic_mode = nil
entity.next_upgrade = nil
entity.surface_conditions = nil
entity.picture.layers[1].tint = items['tint'][8]
entity.localised_name = {'', {'name.trash-entity'}, {'entity-name.steel-chest'}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'steel-chest', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.trash-entity'}, {'entity-name.steel-chest'}}
}})
table.insert(data.raw.technology['steel-processing'].effects, {type = 'unlock-recipe', recipe = item.name})
end
if data.raw['pipe']['pipe'] then
local item = table.deepcopy(data.raw['item']['pipe'])
item.name = 'trash-pipe'
item.place_result = item.name
item.subgroup = 'energy-pipe-distribution'
item.order = 'a[pipe]-c[trash-pipe]'
item.icons = {{icon = item.icon or '__base__/graphics/icons/pipe.png', tint = items['tint'][8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
item.icon = nil
item.icon_size = nil
item.icon_mipmaps = nil
item.localised_name = {'', {'name.trash-entity'}, {'entity-name.pipe'}}
data:extend({item})
local entity = table.deepcopy(data.raw['pipe']['pipe'])
entity.name = item.name
entity.minable.result = item.name
entity.type = 'infinity-pipe'
entity.gui_mode = 'none'
entity.erase_contents_when_mined = true
entity.next_upgrade = nil
for _, v in pairs(entity.pictures) do
v.tint = items['tint'][8]
if v.hr_version then
v.hr_version.tint = items['tint'][8]
end
end
entity.localised_name = {'', {'name.trash-entity'}, {'entity-name.pipe'}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'iron-plate', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.trash-entity'}, {'entity-name.pipe'}}
}})
table.insert(data.raw.technology['automation'].effects, {type = 'unlock-recipe', recipe = item.name})
end
if data.raw['boiler']['boiler'] then
local item = table.deepcopy(data.raw['item']['boiler'])
item.name = 'electric-boiler'
item.place_result = item.name
item.subgroup = 'energy'
item.order = 'b[steam-power]-a[electric-boiler]'
item.localised_name = {'', {'name.electric-entity'}, {'entity-name.boiler'}}
data:extend({item})
local entity = table.deepcopy(data.raw['boiler']['boiler'])
entity.name = item.name
entity.energy_consumption = '7200kW'
entity.buffer_capacity = '14400kJ'
entity.target_temperature = 165
entity.emissions_per_minute = {pollution = 0}
entity.minable.result = entity.name
entity.energy_source = {
type = 'electric',
usage_priority = 'secondary-input',
buffer_capacity = entity.buffer_capacity,
light_flicker = {
color = {r = 0.5, g = 1, b = 1, a = 0.5},
minimum_light_size = 0.1,
light_intensity_to_size_coefficient = 1
}
}
entity.fire_flicker_enabled = false
entity.fire_glow_flicker_enabled = false
entity.fire = {}
entity.localised_name = {'', {'name.electric-entity'}, {'entity-name.boiler'}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = true,
ingredients = {{type = 'item', name = 'boiler', amount = 1}, {type = 'item', name = 'electronic-circuit', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.electric-entity'}, {'entity-name.boiler'}}
}})
data.raw['boiler']['boiler'].fast_replaceable_group = 'boiler'
data.raw['boiler']['electric-boiler'].fast_replaceable_group = data.raw['boiler']['boiler'].fast_replaceable_group
end
if data.raw['reactor']['heating-tower'] then
local item = table.deepcopy(data.raw['item']['heating-tower'])
item.name = 'electric-heating-tower'
item.place_result = item.name
item.subgroup = 'environmental-protection'
item.order = 'c[heating-tower]-e'
item.localised_name = {'', {'name.electric-entity'}, {'entity-name.heating-tower'}}
data:extend({item})
local entity = table.deepcopy(data.raw['reactor']['heating-tower'])
entity.name = item.name
entity.consumption = '160MW'
entity.buffer_capacity = '320MJ'
entity.heat_buffer.max_temperature = 500
entity.scale_energy_usage = true
entity.minable.result = entity.name
entity.energy_source = {
type = 'electric',
usage_priority = 'secondary-input',
buffer_capacity = entity.buffer_capacity,
light_flicker = {
color = {r = 0.5, g = 1, b = 1, a = 0.5},
minimum_light_size = 0.1,
light_intensity_to_size_coefficient = 1
}
}
entity.localised_name = {'', {'name.electric-entity'}, {'entity-name.heating-tower'}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'heating-tower', amount = 1}, {type = 'item', name = 'electronic-circuit', amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.electric-entity'}, {'entity-name.heating-tower'}}
}})
data.raw['reactor']['heating-tower'].fast_replaceable_group = 'heating-tower'
data.raw['reactor']['electric-heating-tower'].fast_replaceable_group = data.raw['reactor']['heating-tower'].fast_replaceable_group
table.insert(data.raw.technology['heating-tower'].effects, {type = 'unlock-recipe', recipe = item.name})
end
for _, c in pairs({'steel-chest', 'passive-provider-chest', 'active-provider-chest', 'storage-chest', 'buffer-chest', 'requester-chest'}) do
if (c == 'steel-chest' and data.raw['container'][c]) or data.raw['logistic-container'][c] then
local item = table.deepcopy(data.raw['item'][c])
item.name = 'basic-' .. c
item.place_result = item.name
item.subgroup = 'storage'
item.order = 'b[storage]-h[basic-' .. c .. ']'
item.localised_name = {'', {'name.basic-entity'}, {'entity-name.' .. c}}
data:extend({item})
local entity = (c == 'steel-chest' and table.deepcopy(data.raw['container'][c])) or table.deepcopy(data.raw['logistic-container'][c])
entity.name = item.name
entity.minable.result = item.name
entity.inventory_type = 'with_filters_and_bar'
entity.inventory_size = 1
entity.quality_affects_inventory_size = false
entity.max_logistic_slots = (c == 'steel-chest' and nil) or 1
entity.trash_inventory_size = (c == 'steel-chest' and nil) or 1
entity.localised_name = {'', {'name.basic-entity'}, {'entity-name.' .. c}}
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name =c, amount = 1}},
results = {{type = 'item', name = item.name, amount = 1}},
main_product = item.name,
localised_name = {'', {'name.basic-entity'}, {'entity-name.' .. c}}
}})
end
end
if data.raw.recipe['basic-steel-chest'] then
table.insert(data.raw.technology['steel-processing'].effects, {type = 'unlock-recipe', recipe = 'basic-steel-chest'})
end
for _, t in pairs({'construction', 'logistic'}) do
for _, r in pairs({'passive-provider', 'storage'}) do
if data.raw.recipe['basic-' .. r .. '-chest'] then
table.insert(data.raw.technology[t .. '-robotics'].effects, {type = 'unlock-recipe', recipe = 'basic-' .. r .. '-chest'})
end
end
end
for _, r in pairs({'active-provider', 'buffer', 'requester'}) do
if data.raw.recipe['basic-' .. r .. '-chest'] then
table.insert(data.raw.technology['logistic-system'].effects, {type = 'unlock-recipe', recipe = 'basic-' .. r .. '-chest'})
end
end
for _, l in pairs({'loader', 'fast-loader', 'express-loader', 'turbo-loader'}) do
if data.raw.recipe[l] and data.raw['loader'][l] then
data.raw.item[l].hidden = false
data.raw.item[l].hidden_in_factoriopedia = false
data.raw.recipe[l].hidden = false
data.raw.recipe[l].hidden_in_factoriopedia = false
data.raw['loader'][l].filter_count = 2
data.raw['loader'][l].per_lane_filters = true
data.raw['loader'][l].adjustable_belt_stack_size = (data.raw['inserter']['stack-inserter'] and true) or false
data.raw['loader'][l].max_belt_stack_size = (data.raw['inserter']['stack-inserter'] and data.raw['inserter']['stack-inserter'].max_belt_stack_size) or 1
end
end
if data.raw['loader']['loader'] and data.raw['loader']['fast-loader'] and data.raw['loader']['express-loader'] then
table.insert(data.raw.technology['logistics'].effects, {type = 'unlock-recipe', recipe = 'loader'})
table.insert(data.raw.technology['logistics-2'].effects, {type = 'unlock-recipe', recipe = 'fast-loader'})
table.insert(data.raw.technology['logistics-3'].effects, {type = 'unlock-recipe', recipe = 'express-loader'})
end
if data.raw['loader']['loader'] and data.raw['loader']['turbo-loader'] then
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type = 'unlock-recipe', recipe = 'turbo-loader'})
end
for _, v in pairs({'underground-belt', 'fast-underground-belt', 'express-underground-belt', 'turbo-underground-belt'}) do
if data.raw.item[v] then
local item = table.deepcopy(data.raw.item[v])
item.name = v .. '-a'
item.place_result = item.name
item.localised_name = {'phi-cl.combine', {'entity-name.' .. v}, '(II)'}
item.localised_description = {'entity-description.' .. v}
data:extend({item})
local entity = table.deepcopy(data.raw['underground-belt'][v])
entity.name = item.name
entity.minable.result = item.name
entity.next_upgrade = nil
entity.surface_conditions = nil
entity.localised_name = {'phi-cl.combine', {'entity-name.' .. v}, '(II)'}
entity.localised_description = {'entity-description.' .. v}
for _, st in pairs({'direction_in', 'direction_out', 'direction_in_side_loading', 'direction_out_side_loading'}) do
entity.structure[st].sheet.filename = items['general']['graphics_location'] .. v .. '.png'
entity.structure[st].sheet.width = 106
entity.structure[st].sheet.height = 85
entity.structure[st].sheetshift = {0.15625, 0.0703125}
end
entity.structure.direction_in.sheet.y = 85
entity.structure.direction_out.sheet.y = nil
entity.structure.direction_in_side_loading.sheet.y = 85
entity.structure.direction_out_side_loading.sheet.y = nil
data:extend({entity})
data:extend({{
type = 'recipe',
name = item.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = v, amount = 2}},
results = {{type = 'item', name = item.name, amount = 2}},
main_product = item.name,
hide_from_player_crafting = true,
allow_productivity = false,
localised_name = {'phi-cl.combine', {'entity-name.' .. v}, '(II)'}
}})
end
end
if data.raw['underground-belt']['underground-belt'] and data.raw['underground-belt']['fast-underground-belt'] and data.raw['underground-belt']['express-underground-belt'] then
data.raw['underground-belt']['underground-belt-a'].next_upgrade = 'fast-underground-belt-a'
data.raw['underground-belt']['fast-underground-belt-a'].next_upgrade = 'express-underground-belt-a'
table.insert(data.raw.technology['logistics'].effects, {type = 'unlock-recipe', recipe = 'underground-belt-a'})
table.insert(data.raw.technology['logistics-2'].effects, {type = 'unlock-recipe', recipe = 'fast-underground-belt-a'})
table.insert(data.raw.technology['logistics-3'].effects, {type = 'unlock-recipe', recipe = 'express-underground-belt-a'})
end
if data.raw['underground-belt']['underground-belt'] and data.raw['underground-belt']['turbo-underground-belt'] then
data.raw['underground-belt']['express-underground-belt-a'].next_upgrade = 'turbo-underground-belt-a'
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type = 'unlock-recipe', recipe = 'turbo-underground-belt-a'})
end
data.raw['proxy-container']['proxy-container'].flags = {'not-blueprintable', 'hide-alt-info', 'not-deconstructable', 'not-flammable', 'not-on-map', 'placeable-off-grid', 'placeable-player', 'no-automated-item-insertion', 'no-automated-item-removal'}
data.raw['proxy-container']['proxy-container'].draw_inventory_content = false
end
if settings.startup['PHI-CT'].value then
for _, v in pairs({'infinity-chest', 'infinity-cargo-wagon', 'infinity-pipe'}) do
data.raw['item'][v].hidden = false