diff --git a/PHI-CL/data-final-fixes.lua b/PHI-CL/data-final-fixes.lua new file mode 100644 index 0000000..d350a06 --- /dev/null +++ b/PHI-CL/data-final-fixes.lua @@ -0,0 +1 @@ +data.raw['utility-constants'].default.zoom_to_world_effect_strength = 0 \ No newline at end of file diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index 59c7e59..272d209 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -19,6 +19,26 @@ function main.EEE(source, tier) item.next_upgrade = source.name .. '-' .. (tier + 1) end + if source.type == 'electric-turret' or source.type == 'ammo-turret' or source.type == 'fluid-turret' then + item.attack_parameters.damage_modifier = (2 ^ (tier - source.min + 1)) + item.attack_parameters.range = source.range + (2 * (tier - source.min + 1)) + item.call_for_help_radius = 40 + (2 * (tier - source.min + 1)) + end + + if item.fluid_boxes then + for k, _ in pairs(item.fluid_boxes) do + if (item.fluid_boxes[k] and (not item.fluid_boxes[k])) then + if item.fluid_boxes[k].production_type then + item.fluid_boxes[k].height = 4 + + if item.fluid_boxes[k].base_level then + item.fluid_boxes[k].base_level = item.fluid_boxes[k].base_level * 4 + end + end + end + end + end + if (source.type == 'accumulator') then item.energy_source.buffer_capacity = (source.base * 4 ^ (tier - source.min + 1)) .. 'MJ' item.energy_source.input_flow_limit = (source.base * 60 * (4 ^ (tier - source.min + 1))) .. 'kW' @@ -77,9 +97,9 @@ function main.EEE(source, tier) item.attack_parameters.damage_modifier = item.attack_parameters.damage_modifier * 2 item.glow_light_intensity = 1 item.attack_parameters.ammo_type.action.action_delivery.max_length = source.range + (2 * (tier - source.min + 1)) - -- item.attack_parameters.ammo_type.energy_consumption = 800 * (2 ^ (tier - source.min + 1)) .. 'kJ' - item.energy_source.input_flow_limit = 9600 * (2 ^ (tier - source.min + 1)) .. 'kW' - item.energy_source.buffer_capacity = 12816 * (2 ^ (tier - source.min + 1)) .. 'kJ' + item.attack_parameters.ammo_type.energy_consumption = tonumber(string.match(item.attack_parameters.ammo_type.energy_consumption, '%d+')) * (2 ^ (tier - source.min + 1)) .. 'kJ' + item.energy_source.input_flow_limit = tonumber(string.match(item.energy_source.input_flow_limit, '%d+')) * (2 ^ (tier - source.min + 1)) .. 'kW' + item.energy_source.buffer_capacity = tonumber(string.match(item.energy_source.buffer_capacity, '%d+')) * (2 ^ (tier - source.min + 1)) .. 'kJ' elseif source.type == 'fluid-turret' then item.prepare_range = 35 + (2 * (tier - source.min + 1)) @@ -98,26 +118,6 @@ function main.EEE(source, tier) end end - if source.type == 'electric-turret' or source.type == 'ammo-turret' or source.type == 'fluid-turret' then - item.attack_parameters.damage_modifier = (2 ^ (tier - source.min + 1)) - item.attack_parameters.range = source.range + (2 * (tier - source.min + 1)) - item.call_for_help_radius = 40 + (2 * (tier - source.min + 1)) - end - - if item.fluid_boxes then - for k, _ in pairs(item.fluid_boxes) do - if (item.fluid_boxes[k] and (not item.fluid_boxes[k])) then - if item.fluid_boxes[k].production_type then - item.fluid_boxes[k].height = 4 - - if item.fluid_boxes[k].base_level then - item.fluid_boxes[k].base_level = item.fluid_boxes[k].base_level * 4 - end - end - end - end - end - -- item.animation.layers[1].filename = graphics_location .. source .. '-e.png' -- item.animation.layers[1].hr_version.filename = graphics_location .. source ..'-eh.png' -- item.icon = graphics_location .. source .. '-i.png' diff --git a/PHI-CL/settings.lua b/PHI-CL/settings.lua index d3635bb..c067b0a 100644 --- a/PHI-CL/settings.lua +++ b/PHI-CL/settings.lua @@ -22,7 +22,7 @@ data:extend({ name = 'PHI-EQ', setting_type = 'startup', default_value = true, - order = 'A6' + order = 'A4' }, { type = 'int-setting', name = 'PHI-XW-WATER', @@ -140,62 +140,62 @@ data:extend({ setting_type = 'startup', default_value = 8, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'G1' + order = 'E1' }, { type = 'int-setting', name = 'PHI-EQ-BATTERY-TIER', setting_type = 'startup', default_value = 8, allowed_values = {2, 3, 4, 5, 6, 7, 8}, - order = 'G2' + order = 'E2' }, { type = 'int-setting', name = 'PHI-EQ-REACTOR-TIER', setting_type = 'startup', default_value = 8, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'G3' + order = 'E3' }, { type = 'int-setting', name = 'PHI-EQ-LASER-TIER', setting_type = 'startup', default_value = 8, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'G4' + order = 'E4' }, { type = 'int-setting', name = 'PHI-EQ-ROBOPORT-TIER', setting_type = 'startup', default_value = 8, allowed_values = {2, 3, 4, 5, 6, 7, 8}, - order = 'G5' + order = 'E5' }, { type = 'int-setting', name = 'PHI-EQ-SHIELD-TIER', setting_type = 'startup', default_value = 8, allowed_values = {2, 3, 4, 5, 6, 7, 8}, - order = 'G6' + order = 'E6' }, { type = 'int-setting', name = 'PHI-EQ-NIGHT-TIER', setting_type = 'startup', default_value = 2, allowed_values = {1, 2}, - order = 'G7' + order = 'E7' }, { type = 'int-setting', name = 'PHI-EQ-EXO-TIER', setting_type = 'startup', default_value = 2, allowed_values = {1, 2}, - order = 'G8' + order = 'E8' }, { type = 'bool-setting', name = 'PHI-EQ-ARMOR', setting_type = 'startup', default_value = true, - order = 'G9' + order = 'E9' }, { type = 'int-setting', name = 'PHI-XW-WATER', diff --git a/PHI-RS/data.lua b/PHI-RS/data.lua index 591c427..6a689f4 100644 --- a/PHI-RS/data.lua +++ b/PHI-RS/data.lua @@ -11,7 +11,7 @@ end data.raw['utility-constants'].default.minimum_recipe_overload_multiplier = settings.startup['PHI-RS-RECIPE-MINROM'].value data.raw['utility-constants'].default.maximum_recipe_overload_multiplier = settings.startup['PHI-RS-RECIPE-MAXROM'].value -if settings.startup['PHI-RS-MODULE'].value == true then +if settings.startup['PHI-RS-MODULE'].value then table.insert(items, { name='speed-module', tech='speed-module' diff --git a/PHI-RS/migrations/migrations.lua b/PHI-RS/migrations/migrations.lua index 8009864..9b63779 100644 --- a/PHI-RS/migrations/migrations.lua +++ b/PHI-RS/migrations/migrations.lua @@ -10,7 +10,7 @@ for index, force in pairs(game.forces) do end for _, v in pairs(items) do - if technologies[v.tech] ~= nil then + if technologies[v.tech] then if technologies[v.tech].researched then if recipes[v.name .. '-s1'] ~= nil then recipes[v.name .. '-s1'].enabled = true