From befdaddbd45a9bd15129dd28aef944b17216b634 Mon Sep 17 00:00:00 2001 From: PHIDIAS <10016767+PHIDIAS0303@users.noreply.github.com> Date: Fri, 2 Dec 2022 02:02:11 +0900 Subject: [PATCH] Update main.lua --- PHI-EQ/main.lua | 389 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 380 insertions(+), 9 deletions(-) diff --git a/PHI-EQ/main.lua b/PHI-EQ/main.lua index a887dc0..f3df163 100644 --- a/PHI-EQ/main.lua +++ b/PHI-EQ/main.lua @@ -99,18 +99,37 @@ end local function EI(source, tier) local item = table.deepcopy(data.raw.item[source]) item.name = source .. "-mk" .. tier - item.place_result = source .. "-mk" .. tier + item.placed_as_equipment_result = source .. "-mk" .. tier item.max_health = 1000 - item.subgroup = "energy" - item.stack_size = 50 - item.default_request_amount = 50 + item.subgroup = "equipment" + item.stack_size = 20 + item.default_request_amount = 5 item.icons = {{icon = graphics_location .. source .. "-i.png", icon_mipmaps = 4, icon_size = 64}} - if (source == "accumulator") + if (source == "solar-panel") then - item.order = "d[" .. source .. "]-a" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" - else - item.order = "e[" .. source .. "]-a" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" + item.order = "a[energy-source]-a" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" + elseif (source == "battery") + then + item.order = "b[battery]-a" .. alpha_order[tier] .. "[" .. source .. "-mk" .. tier .. "]" + elseif (source == "fusion-reactor") + then + item.order = "a[energy-source]-b" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" + elseif (source == "personal-laser-defense") + then + item.order = "b[active-defense]-a" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" + elseif (source == "energy-shield") + then + item.order = "a[shield]-b" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" + elseif (source == "personal-roboport") + then + item.order = "e[robotics]-b" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" + elseif (source == "night-vision") + then + item.order = "f[night-vision]-a" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" + elseif (source == "exoskeleton") + then + item.order = "d[exoskeleton]-a" .. alpha_order[tier - 1] .. "[" .. source .. "-mk" .. tier .. "]" end data:extend({item}) @@ -181,29 +200,381 @@ local function ET(tier) }}) end +for _, animation in ipairs(data.raw["character"]["character"]["animations"]) do + if animation.armors then + for _, armor in ipairs(animation.armors) do + if armor == "power-armor-mk2" then + animation.armors[#animation.armors + 1] = "power-armor-mk3" + break + end + end + end +end + +data:extend({ + { + type = "equipment-grid", + name = "equipment-grid-14x14", + width = 14, + height = 14, + equipment_categories = {"armor"} + }, + { + type = "armor", + name = "power-armor-mk3", + icon = "__base__/graphics/icons/power-armor-mk2.png", + icon_size = 64, icon_mipmaps = 4, + resistances = {{type = "physical", decrease = 20, percent = 50}, {type = "acid", decrease = 20, percent = 80}, + {type = "explosion", decrease = 70, percent = 60}, {type = "fire", decrease = 20, percent = 80}, + {type = "laser", decrease = 20, percent = 50}, {type = "electric", decrease = 20, percent = 50}, + {type = "impact", decrease = 20, percent = 50}, {type = "poison", decrease = 20, percent = 50}}, + subgroup = "armor", + order = "eb[power-armor-mk3]", + stack_size = 1, + infinite = true, + equipment_grid = "equipment-grid-14x14", + inventory_size_bonus = 40, + open_sound = {filename = "__base__/sound/armor-open.ogg", volume = 1}, + close_sound = {filename = "__base__/sound/armor-close.ogg", volume = 1} + } +}) + +data:extend( + { + { + type = "technology", + name = "compound-equipment-energy", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-equipment-mk2" + }, + { + type = "unlock-recipe", + recipe = "night-vision-equipment-mk2" + } + }, + prerequisites = {"compound-energy", "solar-panel-equipment", "battery-mk2-equipment", "night-vision-equipment"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1} + }, + time = 60 + }, + order = "g-e-c" + }, + { + type = "technology", + name = "compound-equipment-energy-2", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-equipment-mk3" + }, + { + type = "unlock-recipe", + recipe = "battery-mk3-equipment" + } + }, + prerequisites = {"compound-energy-2", "compound-equipment-energy", "personal-laser-defense-equipment"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1} + }, + time = 60 + }, + order = "g-e-d" + }, + { + type = "technology", + name = "compound-equipment-energy-3", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-equipment-mk4" + }, + { + type = "unlock-recipe", + recipe = "battery-mk4-equipment" + } + }, + prerequisites = {"compound-energy-3", "compound-equipment-energy-2"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1} + }, + time = 60 + }, + order = "g-e-e" + }, + { + type = "technology", + name = "compound-equipment-energy-4", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-equipment-mk5" + }, + { + type = "unlock-recipe", + recipe = "battery-mk5-equipment" + }, + { + type = "unlock-recipe", + recipe = "fusion-reactor-equipment-mk2" + }, + { + type = "unlock-recipe", + recipe = "energy-shield-mk3-equipment" + }, + { + type = "unlock-recipe", + recipe = "personal-laser-defense-equipment-mk2" + }, + { + type = "unlock-recipe", + recipe = "personal-roboport-mk3-equipment" + }, + { + type = "unlock-recipe", + recipe = "exoskeleton-equipment-mk2" + }, + }, + prerequisites = {"compound-energy-4", "compound-equipment-energy-3", "fusion-reactor-equipment", "personal-roboport-mk2-equipment", "energy-shield-mk2-equipment", "exoskeleton-equipment"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1} + }, + time = 60 + }, + order = "g-e-f" + }, + { + type = "technology", + name = "compound-equipment-energy-5", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-equipment-mk6" + }, + { + type = "unlock-recipe", + recipe = "battery-mk6-equipment" + }, + { + type = "unlock-recipe", + recipe = "fusion-reactor-equipment-mk3" + }, + }, + prerequisites = {"compound-energy-5", "compound-equipment-energy-4"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1} + }, + time = 60 + }, + order = "g-e-g" + }, + { + type = "technology", + name = "compound-equipment-energy-6", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-equipment-mk7" + }, + { + type = "unlock-recipe", + recipe = "battery-mk7-equipment" + }, + { + type = "unlock-recipe", + recipe = "fusion-reactor-equipment-mk4" + }, + { + type = "unlock-recipe", + recipe = "power-armor-mk3" + } + }, + prerequisites = {"compound-energy-6", "compound-equipment-energy-5", "power-armor-mk2"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1} + }, + time = 60 + }, + order = "g-e-h" + }, + { + type = "technology", + name = "compound-equipment-energy-7", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "solar-panel-equipment-mk8" + }, + { + type = "unlock-recipe", + recipe = "battery-mk8-equipment" + }, + { + type = "unlock-recipe", + recipe = "fusion-reactor-equipment-mk5" + } + }, + prerequisites = {"compound-energy-7", "compound-equipment-energy-6"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1} + }, + time = 60 + }, + order = "g-e-i" + }, + { + type = "technology", + name = "compound-equipment-energy-8", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "fusion-reactor-equipment-mk6" + } + }, + prerequisites = {"compound-equipment-energy-7"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1} + }, + time = 60 + }, + order = "g-e-j" + }, + { + type = "technology", + name = "compound-equipment-energy-9", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "fusion-reactor-equipment-mk7" + } + }, + prerequisites = {"compound-equipment-energy-8"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1} + }, + time = 60 + }, + order = "g-e-k" + }, + { + type = "technology", + name = "compound-equipment-energy-10", + icon_size = 256, + icon = "__base__/graphics/technology/solar-panel-equipment.png", + effects = { + { + type = "unlock-recipe", + recipe = "fusion-reactor-equipment-mk8" + } + }, + prerequisites = {"compound-equipment-energy-9"}, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1} + }, + time = 60 + }, + order = "g-e-l" + } + } +) + for i=1, 8, 1 do if (i <= 3) then for j=2, 8, 1 do EE(items[i], j) - -- EI(items[i], j) + EI(items[i], j) ER(items[i], j) end elseif (i == 4) then for j=2, 6, 1 do EE(items[i], j) + EI(items[i], j) ER(items[i], j) end elseif (i <= 6) then for j=3, 6, 1 do EE(items[i], j) + EI(items[i], j) ER(items[i], j) end elseif (i <= 8) then EE(items[i], 2) + EI(items[i], 2) ER(items[i], 2) end end