diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua index 72b3c71..84e6023 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -16,95 +16,6 @@ if settings.startup['PHI-MB'].value then end end -if settings.startup['PHI-MB-EQUIPMENT'].value and settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then - local grid = table.deepcopy(data.raw['equipment-grid']['large-equipment-grid']) - grid.name = 'equipment-grid-14x14' - grid.width = 14 - grid.height = 14 - data:extend({grid}) - - grid = table.deepcopy(data.raw['equipment-grid']['large-equipment-grid']) - grid.name = 'equipment-grid-15x16' - grid.width = 15 - grid.height = 16 - data:extend({grid}) - - local armor = table.deepcopy(data.raw['armor']['power-armor-mk2']) - armor.name = 'power-armor-mk3' - armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}} - armor.icon = nil - armor.icon_size = nil - - for _, v in pairs(armor.resistances) do - v.decrease = v.decrease + 10 - v.percent = ((v.percent < 90) and v.percent + 10) or v.percent - end - - armor.order = armor.order .. '-2' - armor.equipment_grid = 'equipment-grid-14x14' - armor.inventory_size_bonus = armor.inventory_size_bonus + 10 - armor.localised_name = {'phi-cl.combine-gen', {'item-name.power-armor-mk2'}, '3'} - data:extend({armor}) - - data:extend({{ - type = 'recipe', - name = armor.name, - energy_required = 2, - enabled = false, - ingredients = {{type = 'item', name = 'power-armor-mk2', amount = 2}}, - results = {{type = 'item', name = armor.name, amount = 1}}, - main_product = armor.name, - localised_name = {'phi-cl.combine-gen', {'item-name.power-armor-mk2'}, '3'} - }}) - - table.insert(data.raw.technology['power-armor-mk2'].effects, {type = 'unlock-recipe', recipe = armor.name}) - - if mods['space-age'] then - armor = table.deepcopy(data.raw['armor']['mech-armor']) - armor.name = 'mech-armor-mk2' - armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}} - armor.icon = nil - armor.icon_size = nil - - for _, v in pairs(armor.resistances) do - v.decrease = v.decrease + 10 - v.percent = ((v.percent < 90) and v.percent + 10) or v.percent - end - - armor.order = armor.order .. '-2' - armor.equipment_grid = 'equipment-grid-15x16' - armor.inventory_size_bonus = armor.inventory_size_bonus + 10 - armor.localised_name = {'phi-cl.combine-gen', {'item-name.mech-armor'}, '2'} - data:extend({armor}) - - data:extend({{ - type = 'recipe', - name = armor.name, - energy_required = 2, - enabled = false, - ingredients = {{type = 'item', name = 'mech-armor', amount = 2}}, - results = {{type = 'item', name = armor.name, amount = 1}}, - main_product = armor.name, - localised_name = {'phi-cl.combine-gen', {'item-name.mech-armor'}, '2'} - }}) - - table.insert(data.raw.technology['mech-armor'].effects, {type = 'unlock-recipe', recipe = armor.name}) - end - - for _, an in ipairs(data.raw['character']['character']['animations']) do - if an.armors then - for _, ar in ipairs(an.armors) do - if ar == 'power-armor-mk2' then - table.insert(an.armors, 'power-armor-mk3') - - elseif ar == 'mech-armor' then - table.insert(an.armors, 'mech-armor-mk2') - end - end - end - end -end - if (settings.startup['PHI-MI'].value and settings.startup['PHI-MI-GENERIC'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value ~= '') then data.raw.recipe['landfill'].ingredients[1].amount = math.min(20, data.raw.recipe['landfill'].ingredients[1].amount) data.raw['inserter']['burner-inserter'].allow_burner_leech = true diff --git a/PHI-CL/data/mbe.lua b/PHI-CL/data/mbe.lua index ba41d94..3b1d5de 100644 --- a/PHI-CL/data/mbe.lua +++ b/PHI-CL/data/mbe.lua @@ -1,5 +1,4 @@ local items = require 'config' -local main = require 'main' -- MBE C 1 FLUID data.raw['fluid']['steam'].max_temperature = ((settings.startup['PHI-MB-ENERGY-POWER-TIER'].value > 1) and 5000) or data.raw['fluid']['steam'].max_temperature diff --git a/PHI-CL/data/mbq.lua b/PHI-CL/data/mbq.lua index e69de29..aaf7c01 100644 --- a/PHI-CL/data/mbq.lua +++ b/PHI-CL/data/mbq.lua @@ -0,0 +1,98 @@ +local items = require 'config' + +if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then + -- MBQ A 1 ARMOR_GRID + local grid = table.deepcopy(data.raw['equipment-grid']['large-equipment-grid']) + grid.name = 'equipment-grid-14x14' + grid.width = 14 + grid.height = 14 + data:extend({grid}) + + -- MBQ A 1 ARMOR + local armor = table.deepcopy(data.raw['armor']['power-armor-mk2']) + armor.name = 'power-armor-mk3' + armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}} + armor.icon = nil + armor.icon_size = nil + + for _, v in pairs(armor.resistances) do + v.decrease = v.decrease + 10 + v.percent = ((v.percent < 90) and v.percent + 10) or v.percent + end + + armor.order = armor.order .. '-2' + armor.equipment_grid = 'equipment-grid-14x14' + armor.inventory_size_bonus = armor.inventory_size_bonus + 10 + armor.localised_name = {'phi-cl.combine-gen', {'item-name.power-armor-mk2'}, '3'} + data:extend({armor}) + + -- MBQ A 1 RECIPE + data:extend({{ + type = 'recipe', + name = armor.name, + energy_required = 2, + enabled = false, + ingredients = {{type = 'item', name = 'power-armor-mk2', amount = 2}}, + results = {{type = 'item', name = armor.name, amount = 1}}, + main_product = armor.name, + localised_name = {'phi-cl.combine-gen', {'item-name.power-armor-mk2'}, '3'} + }}) + + -- MBQ A 1 RESEARCH_EFFECT + table.insert(data.raw.technology['power-armor-mk2'].effects, {type = 'unlock-recipe', recipe = armor.name}) + + if mods['space-age'] then + -- MBQ A 1 ARMOR_GRID + grid = table.deepcopy(data.raw['equipment-grid']['large-equipment-grid']) + grid.name = 'equipment-grid-15x16' + grid.width = 15 + grid.height = 16 + data:extend({grid}) + + -- MBQ A 1 ARMOR + armor = table.deepcopy(data.raw['armor']['mech-armor']) + armor.name = 'mech-armor-mk2' + armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}} + armor.icon = nil + armor.icon_size = nil + + for _, v in pairs(armor.resistances) do + v.decrease = v.decrease + 10 + v.percent = ((v.percent < 90) and v.percent + 10) or v.percent + end + + armor.order = armor.order .. '-2' + armor.equipment_grid = 'equipment-grid-15x16' + armor.inventory_size_bonus = armor.inventory_size_bonus + 10 + armor.localised_name = {'phi-cl.combine-gen', {'item-name.mech-armor'}, '2'} + data:extend({armor}) + + -- MBQ A 1 RECIPE + data:extend({{ + type = 'recipe', + name = armor.name, + energy_required = 2, + enabled = false, + ingredients = {{type = 'item', name = 'mech-armor', amount = 2}}, + results = {{type = 'item', name = armor.name, amount = 1}}, + main_product = armor.name, + localised_name = {'phi-cl.combine-gen', {'item-name.mech-armor'}, '2'} + }}) + + -- MBQ A 1 RESEARCH_EFFECT + table.insert(data.raw.technology['mech-armor'].effects, {type = 'unlock-recipe', recipe = armor.name}) + end + + for _, an in ipairs(data.raw['character']['character']['animations']) do + if an.armors then + for _, ar in ipairs(an.armors) do + if ar == 'power-armor-mk2' then + table.insert(an.armors, 'power-armor-mk3') + + elseif ar == 'mech-armor' then + table.insert(an.armors, 'mech-armor-mk2') + end + end + end + end +end