mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -4,6 +4,11 @@ local file_stage = 2
|
||||
|
||||
if mods['space-age'] then
|
||||
if settings.startup['PHI-CT'].value then
|
||||
if settings.startup['PHI-CT-HIDDEN'].value then
|
||||
data.raw.recipe['turbo-loader'].hidden = false
|
||||
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type='unlock-recipe', recipe='turbo-loader'})
|
||||
end
|
||||
|
||||
if not settings.startup['PHI-CT-SPOIL'].value then
|
||||
local function spoil_handle(i)
|
||||
i.spoil_ticks = nil
|
||||
|
||||
833
PHI-CL/data.lua
833
PHI-CL/data.lua
@@ -170,387 +170,293 @@ if settings.startup['PHI-EQ'].value and settings.startup['PHI-EQ-ARMOR'].value t
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-EFFCY'].value then
|
||||
data.raw['module']['efficiency-module'].effect = {consumption=-0.4, pollution=-0.4}
|
||||
data.raw['module']['efficiency-module-2'].effect = {consumption=-0.8, pollution=-0.8}
|
||||
data.raw['module']['efficiency-module-3'].effect = {consumption=-1.2, pollution=-1.2}
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and (settings.startup['PHI-MI-LANDFILL'].value ~= 50) then
|
||||
data.raw.recipe['landfill'].ingredients = {{type='item', name='stone', amount=settings.startup['PHI-MI-LANDFILL'].value}}
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-NUCLEAR'].value then
|
||||
for _, v in pairs(data.raw['reactor']) do
|
||||
v.scale_energy_usage = settings.startup['PHI-MI-NUCLEAR'].value
|
||||
if settings.startup['PHI-MI'].value then
|
||||
if settings.startup['PHI-MI-EFFCY'].value then
|
||||
data.raw['module']['efficiency-module'].effect = {consumption=-0.4, pollution=-0.4}
|
||||
data.raw['module']['efficiency-module-2'].effect = {consumption=-0.8, pollution=-0.8}
|
||||
data.raw['module']['efficiency-module-3'].effect = {consumption=-1.2, pollution=-1.2}
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value then
|
||||
local s = (1 + settings.startup['PHI-MI-PIPE'].value) / 2
|
||||
if settings.startup['PHI-MI-LANDFILL'].value ~= 50 then
|
||||
data.raw.recipe['landfill'].ingredients = {{type='item', name='stone', amount=settings.startup['PHI-MI-LANDFILL'].value}}
|
||||
end
|
||||
|
||||
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
|
||||
if settings.startup['PHI-MI-NUCLEAR'].value then
|
||||
for _, v in pairs(data.raw['reactor']) do
|
||||
v.scale_energy_usage = settings.startup['PHI-MI-NUCLEAR'].value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ROBOT'].value then
|
||||
local s = (1 + settings.startup['PHI-MI-ROBOT'].value) / 2
|
||||
local sn = (17 - settings.startup['PHI-MI-ROBOT'].value) / 16
|
||||
if settings.startup['PHI-MI-PIPE'].value then
|
||||
local s = (1 + settings.startup['PHI-MI-PIPE'].value) / 2
|
||||
|
||||
for _, t in pairs({data.raw['construction-robot'], data.raw['logistic-robot']}) do
|
||||
for _, v in pairs(t) do
|
||||
v.speed = v.speed * s
|
||||
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
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI-ROBOT-ENERGY'].value then
|
||||
v.energy_per_tick = '0J'
|
||||
v.energy_per_move = '0J'
|
||||
v.speed_multiplier_when_out_of_energy = 1
|
||||
if settings.startup['PHI-MI-ROBOT'].value then
|
||||
local s = (1 + settings.startup['PHI-MI-ROBOT'].value) / 2
|
||||
local sn = (17 - settings.startup['PHI-MI-ROBOT'].value) / 16
|
||||
|
||||
else
|
||||
v.energy_per_tick = tostring(tonumber(string.match(v.energy_per_tick, '[%d%.]+')) * sn) .. string.match(v.energy_per_tick, '%a+')
|
||||
v.energy_per_move = tostring(tonumber(string.match(v.energy_per_move, '[%d%.]+')) * sn) .. string.match(v.energy_per_move, '%a+')
|
||||
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 = '0J'
|
||||
v.energy_per_move = '0J'
|
||||
v.speed_multiplier_when_out_of_energy = 1
|
||||
|
||||
else
|
||||
v.energy_per_tick = tostring(tonumber(string.match(v.energy_per_tick, '[%d%.]+')) * sn) .. string.match(v.energy_per_tick, '%a+')
|
||||
v.energy_per_move = tostring(tonumber(string.match(v.energy_per_move, '[%d%.]+')) * sn) .. string.match(v.energy_per_move, '%a+')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TOOL'].value then
|
||||
local item = table.deepcopy(data.raw['item']['radar'])
|
||||
item.name = 'super-radar'
|
||||
item.place_result = item.name
|
||||
item.order = 'd[radar]-b[radar]'
|
||||
|
||||
item.icons = {
|
||||
{
|
||||
icon = item.icon or '__base__/graphics/icons/radar.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.super-radar'}
|
||||
data:extend({item})
|
||||
|
||||
local entity = table.deepcopy(data.raw['radar']['radar'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.max_distance_of_sector_revealed = 35
|
||||
entity.max_distance_of_nearby_sector_revealed = 35
|
||||
entity.pictures.layers[1].tint = items['tint'][8]
|
||||
entity.localised_name = item.localised_name
|
||||
data:extend({entity})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = true,
|
||||
ingredients = {{type='item', name='electronic-circuit', amount=5}, {type='item', name='iron-gear-wheel', amount=5}, {type='item', name='iron-plate', amount=10}},
|
||||
results = {{type='item', name=item.name, amount=1}},
|
||||
main_product = item.name,
|
||||
localised_name = {'name.' .. item.name}
|
||||
}})
|
||||
|
||||
item = table.deepcopy(data.raw['item']['electric-energy-interface'])
|
||||
item.name = 'passive-energy-void'
|
||||
item.place_result = item.name
|
||||
item.localised_name = {'name.passive-energy-void'}
|
||||
data:extend({item})
|
||||
|
||||
entity = table.deepcopy(data.raw['electric-energy-interface']['electric-energy-interface'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.energy_source.usage_priority = 'tertiary'
|
||||
entity.energy_source.emissions_per_minute = {pollution = 0}
|
||||
entity.energy_source.input_flow_limit = '1PW'
|
||||
entity.energy_source.output_flow_limit = '0W'
|
||||
entity.energy_source.buffer_capacity = '1PJ'
|
||||
entity.energy_production = '0W'
|
||||
entity.energy_usage = '1PW'
|
||||
entity.gui_mode = 'none'
|
||||
entity.localised_name = item.localised_name
|
||||
data:extend({entity})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = false,
|
||||
ingredients = {{type='item', name='accumulator', amount=1}},
|
||||
results = {{type='item', name=item.name, amount=1}},
|
||||
main_product = item.name,
|
||||
localised_name = item.localised_name
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['electric-energy-accumulators'].effects, {type='unlock-recipe', recipe=item.name})
|
||||
data:extend({{type='recipe-category', name='fluid'}})
|
||||
|
||||
item = table.deepcopy(data.raw['item']['offshore-pump'])
|
||||
item.name = 'super-pump'
|
||||
item.place_result = item.name
|
||||
item.order = 'b[fluids]-a[super-pump]-o'
|
||||
|
||||
item.icons = {
|
||||
{
|
||||
icon = '__base__/graphics/icons/offshore-pump.png',
|
||||
tint = items['tint'][2],
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4
|
||||
}
|
||||
}
|
||||
|
||||
item.icon = nil
|
||||
item.icon_size = nil
|
||||
item.icon_mipmaps = nil
|
||||
item.localised_name = {'name.super-pump'}
|
||||
data:extend({item})
|
||||
|
||||
entity = table.deepcopy(data.raw['offshore-pump']['offshore-pump'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.type = 'assembling-machine'
|
||||
entity.crafting_categories = {'fluid'}
|
||||
entity.crafting_speed = 1
|
||||
entity.energy_source = {type = 'void'}
|
||||
entity.fluid_box.volume = 4000
|
||||
entity.fluid_boxes = {table.deepcopy(entity.fluid_box)}
|
||||
entity.fluid_box = nil
|
||||
entity.fluid_boxes_off_when_no_fluid_recipe = false
|
||||
entity.effect_receiver = {uses_module_effects=false, uses_beacon_effects=false}
|
||||
entity.allowed_effects = {'consumption'}
|
||||
entity.collision_mask = nil
|
||||
entity.tile_buildability_rules = nil
|
||||
entity.fluid_source_offset = nil
|
||||
entity.localised_name = item.localised_name
|
||||
data:extend({entity})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = true,
|
||||
ingredients = {{type='item', name='electronic-circuit', amount=2}, {type='item', name='pipe', amount=1}, {type='item', name='iron-gear-wheel', amount=1}},
|
||||
results = {{type='item', name=item.name, amount=1}},
|
||||
main_product = item.name,
|
||||
localised_name = item.localised_name
|
||||
}})
|
||||
|
||||
for _, v in pairs(data.raw.fluid) do
|
||||
if v.subgroup == 'fluid' then
|
||||
local temp
|
||||
|
||||
if v.max_temperature then
|
||||
temp = v.max_temperature
|
||||
|
||||
else
|
||||
temp = v.default_temperature
|
||||
end
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = v.name,
|
||||
category = 'fluid',
|
||||
energy_required = 1,
|
||||
enabled = true,
|
||||
ingredients = {},
|
||||
results = {{type='fluid', name=v.name, amount=16000, temperature=temp}},
|
||||
main_product = v.name,
|
||||
hide_from_player_crafting = true,
|
||||
allow_productivity = false,
|
||||
crafting_machine_tint = {primary=v.flow_color},
|
||||
localised_name = v.localised_name
|
||||
}})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-UTILITY'].value then
|
||||
local item = table.deepcopy(data.raw['item']['steel-chest'])
|
||||
item.name = 'trash-chest'
|
||||
item.place_result = item.name
|
||||
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-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.type = 'infinity-container'
|
||||
entity.gui_mode = 'none'
|
||||
entity.erase_contents_when_mined = true
|
||||
entity.logistic_mode = nil
|
||||
entity.next_upgrade = nil
|
||||
entity.picture.layers[1].tint = items['tint'][8]
|
||||
entity.localised_name = item.localised_name
|
||||
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 = item.localised_name
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe=item.name})
|
||||
|
||||
item = table.deepcopy(data.raw['item']['pipe'])
|
||||
item.name = 'trash-pipe'
|
||||
item.place_result = item.name
|
||||
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-pipe'}
|
||||
data:extend({item})
|
||||
|
||||
entity = table.deepcopy(data.raw['pipe']['pipe'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.inventory_size = 1
|
||||
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 = item.localised_name
|
||||
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 = item.localised_name
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['automation'].effects, {type='unlock-recipe', recipe=item.name})
|
||||
|
||||
item = table.deepcopy(data.raw['item']['boiler'])
|
||||
item.name = 'electric-boiler'
|
||||
item.place_result = item.name
|
||||
item.order = 'b[steam-power]-a[electric-boiler]'
|
||||
item.localised_name = {'name.electric-boiler'}
|
||||
data:extend({item})
|
||||
|
||||
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 = '14400kJ',
|
||||
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 = item.localised_name
|
||||
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 = item.localised_name
|
||||
}})
|
||||
|
||||
-- electric boiler
|
||||
data.raw['boiler']['boiler'].fast_replaceable_group = 'boiler'
|
||||
data.raw['boiler']['electric-boiler'].fast_replaceable_group = data.raw['boiler']['electric-boiler'].fast_replaceable_group
|
||||
|
||||
local chests = {
|
||||
'steel-chest',
|
||||
'passive-provider-chest',
|
||||
'active-provider-chest',
|
||||
'storage-chest',
|
||||
'buffer-chest',
|
||||
'requester-chest'
|
||||
}
|
||||
|
||||
for _, c in pairs(chests) do
|
||||
item = table.deepcopy(data.raw['item'][c])
|
||||
|
||||
if c == 'steel-chest' then
|
||||
entity = table.deepcopy(data.raw['container'][c])
|
||||
|
||||
else
|
||||
entity = table.deepcopy(data.raw['logistic-container'][c])
|
||||
end
|
||||
|
||||
item.name = 'basic-' .. c
|
||||
if settings.startup['PHI-CT'].value then
|
||||
if settings.startup['PHI-CT-TOOL'].value then
|
||||
local item = table.deepcopy(data.raw['item']['radar'])
|
||||
item.name = 'super-radar'
|
||||
item.place_result = item.name
|
||||
item.order = 'b[storage]-h[basic-' .. c .. ']'
|
||||
item.localised_name = {'name.basic-'.. c}
|
||||
item.order = 'd[radar]-b[radar]'
|
||||
|
||||
item.icons = {
|
||||
{
|
||||
icon = item.icon or '__base__/graphics/icons/radar.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.super-radar'}
|
||||
data:extend({item})
|
||||
|
||||
local entity = table.deepcopy(data.raw['radar']['radar'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.max_distance_of_sector_revealed = 35
|
||||
entity.max_distance_of_nearby_sector_revealed = 35
|
||||
entity.pictures.layers[1].tint = items['tint'][8]
|
||||
entity.localised_name = item.localised_name
|
||||
data:extend({entity})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = true,
|
||||
ingredients = {{type='item', name='electronic-circuit', amount=5}, {type='item', name='iron-gear-wheel', amount=5}, {type='item', name='iron-plate', amount=10}},
|
||||
results = {{type='item', name=item.name, amount=1}},
|
||||
main_product = item.name,
|
||||
localised_name = {'name.' .. item.name}
|
||||
}})
|
||||
|
||||
item = table.deepcopy(data.raw['item']['electric-energy-interface'])
|
||||
item.name = 'passive-energy-void'
|
||||
item.place_result = item.name
|
||||
item.localised_name = {'name.passive-energy-void'}
|
||||
data:extend({item})
|
||||
|
||||
entity = table.deepcopy(data.raw['electric-energy-interface']['electric-energy-interface'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.energy_source.usage_priority = 'tertiary'
|
||||
entity.energy_source.emissions_per_minute = {pollution = 0}
|
||||
entity.energy_source.input_flow_limit = '1PW'
|
||||
entity.energy_source.output_flow_limit = '0W'
|
||||
entity.energy_source.buffer_capacity = '1PJ'
|
||||
entity.energy_production = '0W'
|
||||
entity.energy_usage = '1PW'
|
||||
entity.gui_mode = 'none'
|
||||
entity.localised_name = item.localised_name
|
||||
data:extend({entity})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = false,
|
||||
ingredients = {{type='item', name='accumulator', amount=1}},
|
||||
results = {{type='item', name=item.name, amount=1}},
|
||||
main_product = item.name,
|
||||
localised_name = item.localised_name
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['electric-energy-accumulators'].effects, {type='unlock-recipe', recipe=item.name})
|
||||
data:extend({{type='recipe-category', name='fluid'}})
|
||||
|
||||
item = table.deepcopy(data.raw['item']['offshore-pump'])
|
||||
item.name = 'super-pump'
|
||||
item.place_result = item.name
|
||||
item.order = 'b[fluids]-a[super-pump]-o'
|
||||
|
||||
item.icons = {
|
||||
{
|
||||
icon = '__base__/graphics/icons/offshore-pump.png',
|
||||
tint = items['tint'][2],
|
||||
icon_size = 64,
|
||||
icon_mipmaps = 4
|
||||
}
|
||||
}
|
||||
|
||||
item.icon = nil
|
||||
item.icon_size = nil
|
||||
item.icon_mipmaps = nil
|
||||
item.localised_name = {'name.super-pump'}
|
||||
data:extend({item})
|
||||
|
||||
entity = table.deepcopy(data.raw['offshore-pump']['offshore-pump'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.type = 'assembling-machine'
|
||||
entity.crafting_categories = {'fluid'}
|
||||
entity.crafting_speed = 1
|
||||
entity.energy_source = {type = 'void'}
|
||||
entity.fluid_box.volume = 4000
|
||||
entity.fluid_boxes = {table.deepcopy(entity.fluid_box)}
|
||||
entity.fluid_box = nil
|
||||
entity.fluid_boxes_off_when_no_fluid_recipe = false
|
||||
entity.effect_receiver = {uses_module_effects=false, uses_beacon_effects=false}
|
||||
entity.allowed_effects = {'consumption'}
|
||||
entity.collision_mask = nil
|
||||
entity.tile_buildability_rules = nil
|
||||
entity.fluid_source_offset = nil
|
||||
entity.localised_name = item.localised_name
|
||||
data:extend({entity})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = true,
|
||||
ingredients = {{type='item', name='electronic-circuit', amount=2}, {type='item', name='pipe', amount=1}, {type='item', name='iron-gear-wheel', amount=1}},
|
||||
results = {{type='item', name=item.name, amount=1}},
|
||||
main_product = item.name,
|
||||
localised_name = item.localised_name
|
||||
}})
|
||||
|
||||
for _, v in pairs(data.raw.fluid) do
|
||||
if v.subgroup == 'fluid' then
|
||||
local temp
|
||||
|
||||
if v.max_temperature then
|
||||
temp = v.max_temperature
|
||||
|
||||
else
|
||||
temp = v.default_temperature
|
||||
end
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = v.name,
|
||||
category = 'fluid',
|
||||
energy_required = 1,
|
||||
enabled = true,
|
||||
ingredients = {},
|
||||
results = {{type='fluid', name=v.name, amount=16000, temperature=temp}},
|
||||
main_product = v.name,
|
||||
hide_from_player_crafting = true,
|
||||
allow_productivity = false,
|
||||
crafting_machine_tint = {primary=v.flow_color},
|
||||
localised_name = v.localised_name
|
||||
}})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT-UTILITY'].value then
|
||||
local item = table.deepcopy(data.raw['item']['steel-chest'])
|
||||
item.name = 'trash-chest'
|
||||
item.place_result = item.name
|
||||
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-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.type = 'infinity-container'
|
||||
entity.gui_mode = 'none'
|
||||
entity.erase_contents_when_mined = true
|
||||
entity.logistic_mode = nil
|
||||
entity.next_upgrade = nil
|
||||
entity.picture.layers[1].tint = items['tint'][8]
|
||||
entity.localised_name = item.localised_name
|
||||
data:extend({entity})
|
||||
|
||||
if c ~= 'steel-chest' then
|
||||
entity.max_logistic_slots = 1
|
||||
entity.trash_inventory_size = 1
|
||||
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 = item.localised_name
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe=item.name})
|
||||
|
||||
item = table.deepcopy(data.raw['item']['pipe'])
|
||||
item.name = 'trash-pipe'
|
||||
item.place_result = item.name
|
||||
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-pipe'}
|
||||
data:extend({item})
|
||||
|
||||
entity = table.deepcopy(data.raw['pipe']['pipe'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.inventory_size = 1
|
||||
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 = item.localised_name
|
||||
@@ -561,72 +467,169 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-UTILITY'].value
|
||||
name = item.name,
|
||||
energy_required = 2,
|
||||
enabled = false,
|
||||
ingredients = {{type='item', name=c, amount=1}},
|
||||
ingredients = {{type='item', name='iron-plate', amount=1}},
|
||||
results = {{type='item', name=item.name, amount=1}},
|
||||
main_product = item.name,
|
||||
localised_name = item.localised_name
|
||||
}})
|
||||
end
|
||||
|
||||
table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='basic-steel-chest'})
|
||||
table.insert(data.raw.technology['automation'].effects, {type='unlock-recipe', recipe=item.name})
|
||||
|
||||
for _, t in pairs({'construction', 'logistic'}) do
|
||||
for _, r in pairs({'passive-provider', 'storage'}) do
|
||||
table.insert(data.raw.technology[t .. '-robotics'].effects, {type='unlock-recipe', recipe='basic-' .. r .. '-chest'})
|
||||
item = table.deepcopy(data.raw['item']['boiler'])
|
||||
item.name = 'electric-boiler'
|
||||
item.place_result = item.name
|
||||
item.order = 'b[steam-power]-a[electric-boiler]'
|
||||
item.localised_name = {'name.electric-boiler'}
|
||||
data:extend({item})
|
||||
|
||||
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 = item.localised_name
|
||||
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 = item.localised_name
|
||||
}})
|
||||
|
||||
-- electric boiler
|
||||
data.raw['boiler']['boiler'].fast_replaceable_group = 'boiler'
|
||||
data.raw['boiler']['electric-boiler'].fast_replaceable_group = data.raw['boiler']['electric-boiler'].fast_replaceable_group
|
||||
|
||||
local chests = {
|
||||
'steel-chest',
|
||||
'passive-provider-chest',
|
||||
'active-provider-chest',
|
||||
'storage-chest',
|
||||
'buffer-chest',
|
||||
'requester-chest'
|
||||
}
|
||||
|
||||
for _, c in pairs(chests) do
|
||||
item = table.deepcopy(data.raw['item'][c])
|
||||
|
||||
if c == 'steel-chest' then
|
||||
entity = table.deepcopy(data.raw['container'][c])
|
||||
|
||||
else
|
||||
entity = table.deepcopy(data.raw['logistic-container'][c])
|
||||
end
|
||||
|
||||
item.name = 'basic-' .. c
|
||||
item.place_result = item.name
|
||||
item.order = 'b[storage]-h[basic-' .. c .. ']'
|
||||
item.localised_name = {'name.basic-'.. c}
|
||||
data:extend({item})
|
||||
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.inventory_type = 'with_filters_and_bar'
|
||||
entity.inventory_size = 1
|
||||
|
||||
if c ~= 'steel-chest' then
|
||||
entity.max_logistic_slots = 1
|
||||
entity.trash_inventory_size = 1
|
||||
end
|
||||
|
||||
entity.localised_name = item.localised_name
|
||||
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 = item.localised_name
|
||||
}})
|
||||
end
|
||||
|
||||
table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='basic-steel-chest'})
|
||||
|
||||
for _, t in pairs({'construction', 'logistic'}) do
|
||||
for _, r in pairs({'passive-provider', 'storage'}) do
|
||||
table.insert(data.raw.technology[t .. '-robotics'].effects, {type='unlock-recipe', recipe='basic-' .. r .. '-chest'})
|
||||
end
|
||||
end
|
||||
|
||||
for _, r in pairs({'active-provider', 'buffer', 'requester'}) do
|
||||
table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-' .. r .. '-chest'})
|
||||
end
|
||||
end
|
||||
|
||||
for _, r in pairs({'active-provider', 'buffer', 'requester'}) do
|
||||
table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-' .. r .. '-chest'})
|
||||
if settings.startup['PHI-CT-HIDDEN'].value then
|
||||
local item = table.deepcopy(data.raw['item']['linked-chest'])
|
||||
item.supgroup = 'storage'
|
||||
item.order = 'a[items]-d[linked-chest]'
|
||||
data:extend({item})
|
||||
|
||||
local entity = table.deepcopy(data.raw['linked-container']['linked-chest'])
|
||||
entity.circuit_wire_connection_point = data.raw['container']['steel-chest'].circuit_wire_connection_point
|
||||
entity.circuit_connector_sprites = data.raw['container']['steel-chest'].circuit_connector_sprites
|
||||
entity.circuit_wire_max_distance = data.raw['container']['steel-chest'].circuit_wire_max_distance
|
||||
entity.inventory_type = 'with_filters_and_bar'
|
||||
entity.inventory_size = 48
|
||||
entity.gui_mode = 'all'
|
||||
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
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe=item.name})
|
||||
|
||||
data.raw.recipe['loader'].hidden = false
|
||||
data.raw.recipe['fast-loader'].hidden = false
|
||||
data.raw.recipe['express-loader'].hidden = false
|
||||
|
||||
data.raw['loader']['loader'].max_belt_stack_size = 4
|
||||
data.raw['loader']['fast-loader'].max_belt_stack_size = 4
|
||||
data.raw['loader']['express-loader'].max_belt_stack_size = 4
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-HIDDEN'].value then
|
||||
local item = table.deepcopy(data.raw['item']['linked-chest'])
|
||||
item.supgroup = 'storage'
|
||||
item.order = 'a[items]-d[linked-chest]'
|
||||
data:extend({item})
|
||||
|
||||
local entity = table.deepcopy(data.raw['linked-container']['linked-chest'])
|
||||
entity.circuit_wire_connection_point = data.raw['container']['steel-chest'].circuit_wire_connection_point
|
||||
entity.circuit_connector_sprites = data.raw['container']['steel-chest'].circuit_connector_sprites
|
||||
entity.circuit_wire_max_distance = data.raw['container']['steel-chest'].circuit_wire_max_distance
|
||||
entity.inventory_type = 'with_filters_and_bar'
|
||||
entity.inventory_size = 48
|
||||
entity.gui_mode = 'all'
|
||||
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
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe=item.name})
|
||||
|
||||
data.raw.recipe['loader'].hidden = false
|
||||
data.raw.recipe['fast-loader'].hidden = false
|
||||
data.raw.recipe['express-loader'].hidden = false
|
||||
|
||||
data.raw['loader']['loader'].max_belt_stack_size = 4
|
||||
data.raw['loader']['fast-loader'].max_belt_stack_size = 4
|
||||
data.raw['loader']['express-loader'].max_belt_stack_size = 4
|
||||
|
||||
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'})
|
||||
|
||||
if mods['space-age'] then
|
||||
data.raw.recipe['turbo-loader'].hidden = false
|
||||
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type='unlock-recipe', recipe='turbo-loader'})
|
||||
if settings.startup['PHI-CT-UTILITY'].value then
|
||||
for _, t in pairs({'arithmetic-combinator', 'decider-combinator', 'programmable-speaker', 'selector-combinator'}) do
|
||||
data.raw[t][t].energy_source.usage_priority = 'primary-input'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT'].value then
|
||||
data.raw['utility-constants'].default.rocket_lift_weight = settings.startup['PHI-CT-ROCKET-CAPACITY'].value * 100000
|
||||
data.raw['utility-constants'].default.default_item_weight = settings.startup['PHI-CT-CARGO-WEIGHT'].value
|
||||
|
||||
@@ -636,12 +639,6 @@ if settings.startup['PHI-CT'].value then
|
||||
data.raw['rocket-silo']['rocket-silo'].logistic_trash_inventory_size = 20
|
||||
data.raw['rocket-silo-rocket']['rocket-silo-rocket'].inventory_size = 20
|
||||
]]
|
||||
|
||||
if settings.startup['PHI-CT-UTILITY'].value then
|
||||
for _, t in pairs({'arithmetic-combinator', 'decider-combinator', 'programmable-speaker', 'selector-combinator'}) do
|
||||
data.raw[t][t].energy_source.usage_priority = 'primary-input'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs(data.raw['active-defense-equipment']) do
|
||||
|
||||
Reference in New Issue
Block a user