mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-06-27 05:46:22 +09:00
.
This commit is contained in:
+17
-19
@@ -81,10 +81,8 @@ function main.EEE(source, tier)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if item.energy_source.emissions_per_minute then
|
if item.energy_source.emissions_per_minute then
|
||||||
local m = ((source.tech == 'compound-energy' and ((source.type == 'boiler') or (source.name == 'kr-gas-power-station'))) and (tier - source.min + 2)) or (2 ^ (tier - source.min + 1))
|
|
||||||
|
|
||||||
for k, _ in pairs(item.energy_source.emissions_per_minute) do
|
for k, _ in pairs(item.energy_source.emissions_per_minute) do
|
||||||
item.energy_source.emissions_per_minute[k] = item.energy_source.emissions_per_minute[k] * (tier - source.min + 2)
|
item.energy_source.emissions_per_minute[k] = item.energy_source.emissions_per_minute[k] * (2 ^ (tier - source.min + 1))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -140,36 +138,36 @@ function main.EEE(source, tier)
|
|||||||
end
|
end
|
||||||
|
|
||||||
elseif (source.type == 'boiler') then
|
elseif (source.type == 'boiler') then
|
||||||
item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * tier) .. string.match(item.energy_consumption, '%a+')
|
item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * (2 * (tier - source.min + 1))) .. string.match(item.energy_consumption, '%a+')
|
||||||
item.target_temperature = 15 + ((item.target_temperature - 15) * tier)
|
item.target_temperature = 15 + ((item.target_temperature - 15) * (2 * (tier - source.min + 1)))
|
||||||
|
|
||||||
if (source.name == 'heat-exchanger') then
|
if (source.name == 'heat-exchanger') then
|
||||||
item.energy_source.min_working_temperature = 15 + ((item.energy_source.min_working_temperature - 15) * tier)
|
item.energy_source.min_working_temperature = 15 + ((item.energy_source.min_working_temperature - 15) * (2 * (tier - source.min + 1)))
|
||||||
item.energy_source.max_temperature = item.energy_source.max_temperature * tier
|
item.energy_source.max_temperature = item.energy_source.max_temperature * (2 * (tier - source.min + 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+')
|
item.energy_source.max_transfer = tostring(tonumber(string.match(item.energy_source.max_transfer, '[%d%.]+')) * (2 * (tier - source.min + 1))) .. string.match(item.energy_source.max_transfer, '%a+')
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif (source.type == 'generator') then
|
elseif (source.type == 'generator') then
|
||||||
item.max_power_output = (item.max_power_output and (tonumber(string.match(item.max_power_output, '[%d%.]+')) * (tier - source.min + 2)) .. string.match(item.max_power_output, '%a+')) or nil
|
item.max_power_output = (item.max_power_output and (tonumber(string.match(item.max_power_output, '[%d%.]+')) * (2 * (tier - source.min + 1))) .. string.match(item.max_power_output, '%a+')) or nil
|
||||||
item.maximum_temperature = (item.maximum_temperature and 15 + ((item.maximum_temperature - 15) * tier)) or nil
|
item.maximum_temperature = (item.maximum_temperature and 15 + ((item.maximum_temperature - 15) * (2 * (tier - source.min + 1)))) or nil
|
||||||
|
|
||||||
elseif (source.type == 'reactor') then
|
elseif (source.type == 'reactor') then
|
||||||
item.consumption = tostring(tonumber(string.match(item.consumption, '[%d%.]+')) * tier) .. string.match(item.consumption, '%a+')
|
item.consumption = tostring(tonumber(string.match(item.consumption, '[%d%.]+')) * (2 * (tier - source.min + 1))) .. string.match(item.consumption, '%a+')
|
||||||
item.heat_buffer.max_temperature = item.heat_buffer.max_temperature * tier
|
item.heat_buffer.max_temperature = item.heat_buffer.max_temperature * (2 * (tier - source.min + 1))
|
||||||
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * tier) .. string.match(item.heat_buffer.max_transfer, '%a+')
|
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * (2 * (tier - source.min + 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'})
|
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
|
elseif (source.type == 'fusion-reactor') then
|
||||||
item.power_input = tostring(tonumber(string.match(item.power_input, '[%d%.]+')) * tier) .. string.match(item.power_input, '%a+')
|
item.power_input = tostring(tonumber(string.match(item.power_input, '[%d%.]+')) * (2 * (tier - source.min + 1))) .. string.match(item.power_input, '%a+')
|
||||||
item.max_fluid_usage = item.max_fluid_usage * tier
|
item.max_fluid_usage = item.max_fluid_usage * (2 * (tier - source.min + 1))
|
||||||
|
|
||||||
elseif (source.type == 'fusion-generator') then
|
elseif (source.type == 'fusion-generator') then
|
||||||
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.energy_source.output_flow_limit = tostring(tonumber(string.match(item.energy_source.output_flow_limit, '[%d%.]+')) * (2 * (tier - source.min + 1))) .. string.match(item.energy_source.output_flow_limit, '%a+')
|
||||||
item.max_fluid_usage = item.max_fluid_usage * tier
|
item.max_fluid_usage = item.max_fluid_usage * (2 * (tier - source.min + 1))
|
||||||
|
|
||||||
elseif (source.type == 'heat-pipe') then
|
elseif (source.type == 'heat-pipe') then
|
||||||
item.heat_buffer.max_temperature = item.heat_buffer.max_temperature * tier
|
item.heat_buffer.max_temperature = item.heat_buffer.max_temperature * (2 * (tier - source.min + 1))
|
||||||
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * tier) .. string.match(item.heat_buffer.max_transfer, '%a+')
|
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * (2 * (tier - source.min + 1))) .. string.match(item.heat_buffer.max_transfer, '%a+')
|
||||||
tint_handle(item, tier, {'connection_sprites', 'heat_glow_sprites'})
|
tint_handle(item, tier, {'connection_sprites', 'heat_glow_sprites'})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+14
-14
@@ -23,50 +23,50 @@ return {
|
|||||||
name = 'steam-engine',
|
name = 'steam-engine',
|
||||||
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
||||||
},
|
},
|
||||||
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
|
-- MBE A 2 BASE ENTITY,RECIPE,RESEARCH_EFFECT
|
||||||
['nuclear-reactor'] = {
|
['nuclear-reactor'] = {
|
||||||
type = 'reactor',
|
type = 'reactor',
|
||||||
name = 'nuclear-reactor',
|
name = 'nuclear-reactor',
|
||||||
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 5)
|
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
||||||
},
|
},
|
||||||
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
|
-- MBE A 2 BASE ENTITY,RECIPE,RESEARCH_EFFECT
|
||||||
['heat-pipe'] = {
|
['heat-pipe'] = {
|
||||||
type = 'heat-pipe',
|
type = 'heat-pipe',
|
||||||
name = 'heat-pipe',
|
name = 'heat-pipe',
|
||||||
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 5)
|
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
||||||
},
|
},
|
||||||
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
|
-- MBE A 2 BASE ENTITY,RECIPE,RESEARCH_EFFECT
|
||||||
['heat-exchanger'] = {
|
['heat-exchanger'] = {
|
||||||
type = 'boiler',
|
type = 'boiler',
|
||||||
name = 'heat-exchanger',
|
name = 'heat-exchanger',
|
||||||
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 5)
|
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
||||||
},
|
},
|
||||||
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
|
-- MBE A 2 BASE ENTITY,RECIPE,RESEARCH_EFFECT
|
||||||
['steam-turbine'] = {
|
['steam-turbine'] = {
|
||||||
type = 'generator',
|
type = 'generator',
|
||||||
name = 'steam-turbine',
|
name = 'steam-turbine',
|
||||||
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 5)
|
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
||||||
},
|
},
|
||||||
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
|
-- MBE A 2 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
|
||||||
['fusion-reactor'] = {
|
['fusion-reactor'] = {
|
||||||
mod = 'space-age',
|
mod = 'space-age',
|
||||||
type = 'fusion-reactor',
|
type = 'fusion-reactor',
|
||||||
name = 'fusion-reactor',
|
name = 'fusion-reactor',
|
||||||
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 5)
|
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
||||||
},
|
},
|
||||||
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
|
-- MBE A 2 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
|
||||||
['fusion-generator'] = {
|
['fusion-generator'] = {
|
||||||
mod = 'space-age',
|
mod = 'space-age',
|
||||||
type = 'fusion-generator',
|
type = 'fusion-generator',
|
||||||
name = 'fusion-generator',
|
name = 'fusion-generator',
|
||||||
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 5)
|
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
||||||
},
|
},
|
||||||
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
|
-- MBE A 2 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
|
||||||
['heating-tower'] = {
|
['heating-tower'] = {
|
||||||
mod = 'space-age',
|
mod = 'space-age',
|
||||||
type = 'reactor',
|
type = 'reactor',
|
||||||
name = 'heating-tower',
|
name = 'heating-tower',
|
||||||
tech = 'heating-tower',
|
tech = 'heating-tower',
|
||||||
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 5)
|
max = math.min(tonumber(settings.startup['PHI-MB-ENERGY'].value) or 1, 3)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user