mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -253,7 +253,7 @@ if mods and mods['space-age'] then
|
||||
type = 'fusion-reactor',
|
||||
name = 'fusion-reactor',
|
||||
ref_name = 'fusion-reactor',
|
||||
tech = 'fusion-reactor',
|
||||
tech = 'compound-energy',
|
||||
min = 2,
|
||||
max = settings.startup['PHI-EN-POWER-TIER'].value
|
||||
}
|
||||
@@ -264,7 +264,7 @@ if mods and mods['space-age'] then
|
||||
type = 'fusion-generator',
|
||||
name = 'fusion-generator',
|
||||
ref_name = 'fusion-generator',
|
||||
tech = 'fusion-reactor',
|
||||
tech = 'compound-energy',
|
||||
min = 2,
|
||||
max = settings.startup['PHI-EN-POWER-TIER'].value
|
||||
}
|
||||
@@ -275,9 +275,9 @@ if mods and mods['space-age'] then
|
||||
type = 'reactor',
|
||||
name = 'heating-tower',
|
||||
ref_name = 'heating-tower',
|
||||
tech = 'heating-tower',
|
||||
tech = 'compound-energy',
|
||||
min = 2,
|
||||
max = settings.startup['PHI-EN-ASSEMBLING-TIER'].value
|
||||
max = settings.startup['PHI-MB-MACHINE-TIER'].value
|
||||
}
|
||||
|
||||
items['item']['railgun-turret'] = {
|
||||
@@ -312,10 +312,7 @@ if mods and mods['space-age'] then
|
||||
min = 2,
|
||||
max = settings.startup['PHI-WE-LASER-TIER'].value
|
||||
}
|
||||
end
|
||||
|
||||
--[[
|
||||
if mods['space-age'] then
|
||||
items['item']['foundry'] = {
|
||||
enabled = settings.startup['PHI-MB'].value,
|
||||
stage = 2,
|
||||
@@ -325,7 +322,7 @@ if mods['space-age'] then
|
||||
tech = 'foundry',
|
||||
min = 2,
|
||||
max = settings.startup['PHI-MB-MACHINE-TIER'].value
|
||||
|
||||
}
|
||||
|
||||
items['item']['big-mining-drill'] = {
|
||||
enabled = settings.startup['PHI-MB'].value,
|
||||
@@ -352,7 +349,7 @@ if mods['space-age'] then
|
||||
items['item']['crusher'] = {
|
||||
enabled = settings.startup['PHI-MB'].value,
|
||||
stage = 2,
|
||||
type = 'furnace',
|
||||
type = 'assembling-machine',
|
||||
name = 'crusher',
|
||||
ref_name = 'crusher',
|
||||
tech = 'space-platform',
|
||||
@@ -404,6 +401,5 @@ if mods['space-age'] then
|
||||
max = settings.startup['PHI-MB-MACHINE-TIER'].value
|
||||
}
|
||||
end
|
||||
]]
|
||||
|
||||
return items
|
||||
|
||||
@@ -518,19 +518,6 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-OIL'].value the
|
||||
for _, v in pairs({'water', 'crude-oil', 'lava'}) do
|
||||
if data.raw.fluid[v] then
|
||||
local item = table.deepcopy(data.raw['item']['offshore-pump'])
|
||||
|
||||
item.pumping_speed = 20
|
||||
item.adjacent_tile_collision_mask = nil
|
||||
item.adjacent_tile_collision_test = {'ground-tile'}
|
||||
item.tile_buildability_rules = nil
|
||||
item.water_reflection = nil
|
||||
item.layers = {
|
||||
item = true,
|
||||
object = true,
|
||||
player = true,
|
||||
water_tile = true,
|
||||
elevated_rail = true
|
||||
}
|
||||
item.name = v .. '-pump'
|
||||
item.place_result = v .. '-pump'
|
||||
item.order = 'b[fluids]-a[offshore-pump]-o'
|
||||
@@ -554,8 +541,20 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-OIL'].value the
|
||||
local entity = table.deepcopy(data.raw['offshore-pump']['offshore-pump'])
|
||||
entity.name = v .. '-pump'
|
||||
entity.minable.result = v .. '-pump'
|
||||
entity.fluid = 'crude-oil'
|
||||
entity.fluid_box.filter = 'crude-oil'
|
||||
entity.fluid = v
|
||||
entity.fluid_box.filter = v
|
||||
entity.pumping_speed = 20
|
||||
entity.adjacent_tile_collision_mask = nil
|
||||
entity.adjacent_tile_collision_test = {'ground-tile'}
|
||||
entity.tile_buildability_rules = nil
|
||||
entity.water_reflection = nil
|
||||
entity.layers = {
|
||||
item = true,
|
||||
object = true,
|
||||
player = true,
|
||||
water_tile = true,
|
||||
elevated_rail = true
|
||||
}
|
||||
entity.localised_name = {'name.' .. v .. '-pump'}
|
||||
entity.localised_description = {'description.' .. v .. '-pump'}
|
||||
data:extend({entity})
|
||||
|
||||
@@ -108,11 +108,11 @@ function main.EEE(source, tier)
|
||||
tint_handle(item, tier, {'connection_patches_connected', 'connection_patches_disconnected', 'heat_connection_patches_connected', 'heat_connection_patches_disconnected', 'lower_layer_picture'})
|
||||
|
||||
elseif (source.type == 'fusion-reactor') then
|
||||
item.consumption = tostring(tonumber(string.match(item.consumption, '[%d%.]+')) * tier) .. string.match(item.consumption, '%a+')
|
||||
item.power_input = tostring(tonumber(string.match(item.power_input, '[%d%.]+')) * tier) .. string.match(item.power_input, '%a+')
|
||||
item.max_fluid_usage = item.max_fluid_usage * (2 ^ (tier - source.min + 1))
|
||||
|
||||
elseif (source.type == 'fusion-generator') then
|
||||
item.max_power_output = tostring(tonumber(string.match(item.max_power_output, '[%d%.]+')) * tier) .. string.match(item.max_power_output, '%a+')
|
||||
item.energy_source.output_flow_limit = tostring(tonumber(string.match(item.energy_source.output_flow_limit, '[%d%.]+')) * tier) .. string.match(item.energy_source.output_flow_limit, '%a+')
|
||||
item.max_fluid_usage = item.max_fluid_usage * (2 ^ (tier - source.min + 1))
|
||||
|
||||
elseif (source.type == 'heat-pipe') then
|
||||
@@ -131,10 +131,6 @@ function main.EEE(source, tier)
|
||||
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
|
||||
@@ -149,14 +145,6 @@ function main.EEE(source, tier)
|
||||
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
|
||||
@@ -172,18 +160,22 @@ function main.EEE(source, tier)
|
||||
item.crafting_speed = item.crafting_speed * (2 ^ (tier - source.min + 1))
|
||||
end
|
||||
|
||||
if item.energy_source then
|
||||
if item.energy_source.emissions_per_minute then
|
||||
if source.tech == 'compound-energy' then
|
||||
if (source.type == 'boiler') or (source.name == 'kr-gas-power-station') then
|
||||
item.energy_source.emissions_per_minute.pollution = item.energy_source.emissions_per_minute.pollution * (tier - source.min + 2)
|
||||
|
||||
else
|
||||
item.energy_source.emissions_per_minute.pollution = item.energy_source.emissions_per_minute.pollution * (2 ^ (tier - source.min + 1))
|
||||
if item.energy_source and item.energy_source.emissions_per_minute then
|
||||
if source.tech == 'compound-energy' then
|
||||
if (source.type == 'boiler') or (source.name == 'kr-gas-power-station') then
|
||||
for _, v in pairs(item.energy_source.emissions_per_minute) do
|
||||
v = v * (tier - source.min + 2)
|
||||
end
|
||||
|
||||
else
|
||||
item.energy_source.emissions_per_minute.pollution = item.energy_source.emissions_per_minute.pollution * (2 ^ (tier - source.min + 1))
|
||||
for _, v in pairs(item.energy_source.emissions_per_minute) do
|
||||
v = v * (2 ^ (tier - source.min + 1))
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
for _, v in pairs(item.energy_source.emissions_per_minute) do
|
||||
v = v * (2 ^ (tier - source.min + 1))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -196,10 +188,6 @@ function main.EEE(source, tier)
|
||||
while i < #item.idle_animation.layers do
|
||||
if item.idle_animation.layers[i] then
|
||||
item.idle_animation.layers[i].tint = items['tint'][tier]
|
||||
|
||||
if item.idle_animation.layers[i].hr_version then
|
||||
item.idle_animation.layers[i].hr_version.tint = items['tint'][tier]
|
||||
end
|
||||
end
|
||||
|
||||
i = i + 2
|
||||
@@ -212,10 +200,6 @@ function main.EEE(source, tier)
|
||||
|
||||
if item.base_picture and item.base_picture.sheets then
|
||||
item.base_picture.sheets[1].tint = items['tint'][tier]
|
||||
|
||||
if item.base_picture.sheets[1].hr_version then
|
||||
item.base_picture.sheets[1].hr_version.tint = items['tint'][tier]
|
||||
end
|
||||
end
|
||||
|
||||
if tier > 1 then
|
||||
|
||||
Reference in New Issue
Block a user