This commit is contained in:
2024-09-27 18:48:56 +09:00
parent 5397e081e1
commit 42772d3629
4 changed files with 122 additions and 147 deletions

View File

@@ -8,6 +8,8 @@ data.raw['utility-constants'].default.zoom_to_world_can_use_nightvision = true
data.raw['arithmetic-combinator']['arithmetic-combinator'].energy_source.usage_priority = 'primary-input'
data.raw['decider-combinator']['decider-combinator'].energy_source.usage_priority = 'primary-input'
data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true
for _,name in pairs({'furnace', 'lab', 'beacon'}) do
local entities = {}
@@ -55,7 +57,7 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value th
if data.raw[k].fluid_boxes then
for k1, _ in pairs(data.raw[k].fluid_boxes) do
if data.raw[k].fluid_boxes[k1] ~= false and data.raw[k].fluid_boxes[k1] ~= true then
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

View File

@@ -434,62 +434,45 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRAIN'].value t
end
if settings.startup['PHI-MB'].value then
item = table.deepcopy(data.raw['item']['satellite'])
item.name = 'satellite-2'
item.rocket_launch_product = {type='item', name='space-science-pack', amount=2000}
item.icons = {
{
icon = '__base__/graphics/icons/satellite.png',
tint = items['tint'][2],
icon_size = 64,
icon_mipmaps = 4
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))}
item.icons = {
{
icon = '__base__/graphics/icons/satellite.png',
tint = items['tint'][i],
icon_size = 64,
icon_mipmaps = 4
}
}
}
item.order = 'm[satellite]-2'
data:extend({item})
item.order = 'm[satellite]-' .. i
data:extend({item})
item = table.deepcopy(data.raw['item']['satellite'])
item.name = 'satellite-3'
item.rocket_launch_product = {type='item', name='space-science-pack', amount=4000}
item.icons = {
{
local inn
if i == 2 then
inn = 'satellite'
else
inn = 'satellite-' .. (i - 1)
end
data:extend({{
type = 'recipe',
name = 'satellite-' .. i,
energy_required = 5,
enabled = false,
icon = '__base__/graphics/icons/satellite.png',
tint = items['tint'][3],
icon_size = 64,
icon_mipmaps = 4
}
}
item.order = 'm[satellite]-2'
data:extend({item})
icon_mipmaps = 4,
category = 'crafting',
ingredients = {{inn, 2}},
results = {{name = 'satellite-' .. i, amount = 1}}
}})
data:extend({{
type = 'recipe',
name = 'satellite-2',
energy_required = 5,
enabled = false,
icon = '__base__/graphics/icons/satellite.png',
icon_size = 64,
icon_mipmaps = 4,
category = 'crafting',
ingredients = {{'satellite', 2}},
results = {{name = 'satellite-2', amount = 1}}
}})
data:extend({{
type = 'recipe',
name = 'satellite-3',
energy_required = 5,
enabled = false,
icon = '__base__/graphics/icons/satellite.png',
icon_size = 64,
icon_mipmaps = 4,
category = 'crafting',
ingredients = {{'satellite-2', 2}},
results = {{name = 'satellite-3', amount = 1}}
}})
table.insert(data.raw.technology['space-science-pack'].effects, {type='unlock-recipe', recipe='satellite-2'})
table.insert(data.raw.technology['space-science-pack'].effects, {type='unlock-recipe', recipe='satellite-3'})
table.insert(data.raw.technology['space-science-pack'].effects, {type='unlock-recipe', recipe='satellite-' .. i})
end
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-REPAIR'].value then

View File

@@ -1,8 +1,8 @@
{
"name": "PHI-CL",
"version": "2.0.38",
"version": "2.0.40",
"factorio_version": "1.1",
"date": "2024-09-25",
"date": "2024-09-27",
"title": "Phidias Collection",
"author": "PHIDIAS0303",
"contributers": "",

View File

@@ -9,34 +9,55 @@ local entity_tint = {
'horizontal_animation',
'vertical_animation',
'structure',
'connection_sprites',
'heat_glow_sprites',
'heat_connection_patches_connected',
'heat_connection_patches_disconnected',
'lower_layer_picture',
'integration_patch'
}
local entity_mining_tint = {
'graphics_set',
'wet_mining_graphics_set'
local tint_handle_c = {
'layers',
'sheets'
}
local entity_lab_tint = {
{
['a'] = 'on_animation',
['n'] = 3
},
{
['a'] = 'off_animation',
['n'] = 2
}
}
local function tint_handle(item, tier, tl)
for _, ve in pairs(tl) do
if item[ve] then
for _, tc in pairs(tint_handle_c) do
if item[ve][tc] and item[ve][tc][1] then
item[ve][tc][1].tint = items['tint'][tier]
local entity_accumulator_tint = {
'charge_animation',
'discharge_animation'
}
if item[ve][tc][1].hr_version then
item[ve][tc][1].hr_version.tint = items['tint'][tier]
end
end
for _, v in pairs(item[ve]) do
if type(v) == 'table' then
if v[tc] then
if v[tc][1] then
v[tc][1].tint = items['tint'][tier]
if v[tc][1].hr_version then
v[tc][1].hr_version.tint = items['tint'][tier]
end
end
end
for i=1, #v, 1 do
if v[i] and type(v[i]) == 'table' then
if v[i][tc] and v[i][tc][1] then
v[i][tc][1].tint = items['tint'][tier]
if v[i][tc][1].hr_version then
v[i][tc][1].hr_version.tint = items['tint'][tier]
end
end
end
end
end
end
end
end
end
end
-- entity
function main.EEE(source, tier)
@@ -96,7 +117,7 @@ function main.EEE(source, tier)
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'
for _, v in pairs(entity_accumulator_tint) do
for _, v in pairs({'charge_animation', 'discharge_animation'}) do
if item[v] and item[v].layers then
if item[v].layers[1] and item[v].layers[1].layers and item[v].layers[1].layers[1] then
item[v].layers[1].layers[1].tint = items['tint'][tier]
@@ -161,19 +182,55 @@ function main.EEE(source, tier)
item.heat_buffer.max_temperature = source.temp * (tier + 1)
item.heat_buffer.max_transfer = source.temp * (tier + 1) * 0.02 .. 'GW'
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'
tint_handle(item, tier, {'connection_sprites', 'heat_glow_sprites'})
end
end
if (source.type == 'lab') then
item.researching_speed = item.researching_speed * (2 ^ (tier - source.min + 1))
for _, v in pairs({{['a'] = 'on_animation', ['n'] = 3}, {['a'] = 'off_animation', ['n'] = 2}}) do
if item[v['a']] and item[v['a']].layers then
for i=1, v['n'], 1 do
if item[v['a']].layers[i] then
item[v['a']].layers[i].tint = items['tint'][tier]
if item[v['a']].layers[i].hr_version then
item[v['a']].layers[i].hr_version.tint = items['tint'][tier]
end
end
end
end
end
elseif (source.type == 'mining-drill') then
item.mining_speed = item.mining_speed * (2 ^ (tier - source.min + 1))
for _, e in pairs({'graphics_set', 'wet_mining_graphics_set'}) do
if item[e] and item[e].animation then
for _, d in pairs(item[e].animation) do
if d.layers then
d.layers[1].tint = items['tint'][tier]
d.layers[2].tint = items['tint'][tier]
if d.layers[1].hr_version then
d.layers[1].hr_version.tint = items['tint'][tier]
end
if d.layers[2].hr_version then
d.layers[2].hr_version.tint = items['tint'][tier]
end
end
end
end
end
elseif source.type == 'radar' then
item.max_distance_of_sector_revealed = item.max_distance_of_sector_revealed + (2 * tier)
item.max_distance_of_nearby_sector_revealed = item.max_distance_of_nearby_sector_revealed + (2 * tier)
@@ -184,6 +241,8 @@ function main.EEE(source, tier)
item.active_energy_usage = eu * (2 ^ (tier - source.min + 1)) .. euu
item.rocket_parts_required = 200 * (tier - source.min + 1)
item.rocket_result_inventory_size = math.ceil(data.raw['item']['satellite'].rocket_launch_product[2] * 3 * (tier - source.min + 1) / data.raw['tool']['space-science-pack'].stack_size)
tint_handle(item, tier, {'arm_01_back_animation', 'arm_02_right_animation', 'arm_03_front_animation', 'base_day_sprite', 'base_front_sprite', 'door_back_sprite', 'door_front_sprite', 'hole_sprite', 'rocket_glow_overlay_sprite', 'rocket_shadow_overlay_sprite', 'satellite_animation'})
end
if item.crafting_speed then
@@ -209,43 +268,7 @@ function main.EEE(source, tier)
item.type = 'assembling-machine'
end
for _, ve in pairs(entity_tint) do
if item[ve] then
if item[ve].layers and item[ve].layers[1] then
item[ve].layers[1].tint = items['tint'][tier]
if item[ve].layers[1].hr_version then
item[ve].layers[1].hr_version.tint = items['tint'][tier]
end
end
for _, v in pairs(item[ve]) do
if type(v) == 'table' then
if v.layers then
if v.layers[1] then
v.layers[1].tint = items['tint'][tier]
if v.layers[1].hr_version then
v.layers[1].hr_version.tint = items['tint'][tier]
end
end
end
for i=1, #v, 1 do
if v[i] and type(v[i]) == 'table' then
if v[i].layers and v[i].layers[1] then
v[i].layers[1].tint = items['tint'][tier]
if v[i].layers[1].hr_version then
v[i].layers[1].hr_version.tint = items['tint'][tier]
end
end
end
end
end
end
end
end
tint_handle(item, tier, entity_tint)
if item.idle_animation and item.idle_animation.layers then
local i = 1
@@ -267,39 +290,6 @@ function main.EEE(source, tier)
end
end
for _, v in pairs(entity_lab_tint) do
if item[v['a']] and item[v['a']].layers then
for i=1, v['n'], 1 do
if item[v['a']].layers[i] then
item[v['a']].layers[i].tint = items['tint'][tier]
if item[v['a']].layers[i].hr_version then
item[v['a']].layers[i].hr_version.tint = items['tint'][tier]
end
end
end
end
end
for _, e in pairs(entity_mining_tint) do
if item[e] and item[e].animation then
for _, d in pairs(item[e].animation) do
if d.layers then
d.layers[1].tint = items['tint'][tier]
d.layers[2].tint = items['tint'][tier]
if d.layers[1].hr_version then
d.layers[1].hr_version.tint = items['tint'][tier]
end
if d.layers[2].hr_version then
d.layers[2].hr_version.tint = items['tint'][tier]
end
end
end
end
end
if item.base_picture and item.base_picture.sheets then
item.base_picture.sheets[1].tint = items['tint'][tier]