-- Logistics Tab

-- Production Tab

-- Resources Tab
-- Iron
data.raw.recipe["se-iron-ingot-to-plate"].order = "a[iron]-e[iron-plate]-c[iron-plate]"

-- Copper
data.raw.recipe["se-copper-ingot-to-plate"].order = "a[copper]-e[copper-plate]-c[copper-plate]"

-- Manufacturing Tab

-- Basic Matter Conversion
data.raw.recipe["kr-stone-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-stone-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-stone-to-matter"].order = "a[basic-matter]-a[conversion]-b[stone]"
data.raw.recipe["kr-iron-ore-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-iron-ore-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-iron-ore-to-matter"].order = "a[basic-matter]-a[conversion]-d[iron]"
data.raw.recipe["kr-copper-ore-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-copper-ore-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-copper-ore-to-matter"].order = "a[basic-matter]-a[conversion]-e[copper]"
data.raw.recipe["kr-kr-rare-metal-ore-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-kr-rare-metal-ore-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-kr-rare-metal-ore-to-matter"].order = "a[basic-matter]-a[conversion]-f[rare-metal]"
data.raw.recipe["kr-coal-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-coal-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-coal-to-matter"].order = "a[basic-matter]-a[conversion]-g[coal]"
data.raw.recipe["kr-crude-oil-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-crude-oil-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-crude-oil-to-matter"].order = "a[basic-matter]-a[conversion]-h[oil]"
data.raw.recipe["kr-kr-mineral-water-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-kr-mineral-water-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-kr-mineral-water-to-matter"].order = "a[basic-matter]-a[conversion]-i[mineral-water]"
data.raw.recipe["kr-uranium-ore-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-uranium-ore-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-uranium-ore-to-matter"].order = "a[basic-matter]-a[conversion]-j[uranium-ore]"
data.raw.recipe["kr-uranium-238-to-matter"].category = "basic-matter-conversion"
data.raw.recipe["kr-uranium-238-to-matter"].subgroup = "basic-matter-conversion"
data.raw.recipe["kr-uranium-238-to-matter"].order = "a[basic-matter]-a[conversion]-k[uranium-238]"

-- Basic Matter Deconversion
data.raw.recipe["kr-matter-to-water"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-water"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-water"].order = "a[basic-matter]-b[deconversion]-a[water]"
data.raw.recipe["kr-matter-to-stone"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-stone"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-stone"].order = "a[basic-matter]-b[deconversion]-b[stone]"
data.raw.recipe["kr-matter-to-kr-sand"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-kr-sand"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-kr-sand"].order = "a[basic-matter]-b[deconversion]-c[sand]"
data.raw.recipe["kr-matter-to-iron-ore"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-iron-ore"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-iron-ore"].order = "a[basic-matter]-b[deconversion]-d[iron]"
data.raw.recipe["kr-matter-to-copper-ore"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-copper-ore"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-copper-ore"].order = "a[basic-matter]-b[deconversion]-e[copper]"
data.raw.recipe["kr-matter-to-kr-rare-metal-ore"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-kr-rare-metal-ore"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-kr-rare-metal-ore"].order = "a[basic-matter]-b[deconversion]-f[rare-metal]"
data.raw.recipe["kr-matter-to-coal"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-coal"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-coal"].order = "a[basic-matter]-b[deconversion]-g[coal]"
data.raw.recipe["kr-matter-to-crude-oil"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-crude-oil"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-crude-oil"].order = "a[basic-matter]-b[deconversion]-h[oil]"
data.raw.recipe["kr-matter-to-kr-mineral-water"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-kr-mineral-water"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-kr-mineral-water"].order = "a[basic-matter]-b[deconversion]-i[mineral-water]"
data.raw.recipe["kr-matter-to-uranium-ore"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-uranium-ore"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-uranium-ore"].order = "a[basic-matter]-b[deconversion]-j[uranium-ore]"
data.raw.recipe["kr-matter-to-uranium-238"].category = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-uranium-238"].subgroup = "basic-matter-deconversion"
data.raw.recipe["kr-matter-to-uranium-238"].order = "a[basic-matter]-b[deconversion]-k[uranium-238]"

-- Advanced Matter Conversion
data.raw.recipe["kr-kr-matter-cube-to-matter"].order = "a"
data.raw.recipe["se-kr-se-vulcanite-to-matter"].order = "b"
data.raw.recipe["se-kr-se-cryonite-to-matter"].order = "c"
data.raw.recipe["kr-kr-imersite-to-matter"].order = "d"
data.raw.recipe["se-kr-se-beryllium-ore-to-matter"].order = "e"
data.raw.recipe["se-kr-se-holmium-ore-to-matter"].order = "f"
data.raw.recipe["se-kr-se-iridium-ore-to-matter"].order = "g"
data.raw.recipe["kr-kr-quartz-to-matter"].order = "h"

-- Advanced Matter Deconversion
data.raw.recipe["kr-matter-to-kr-matter-cube"].order = "a"
data.raw.recipe["se-kr-matter-to-se-vulcanite"].order = "b"
data.raw.recipe["se-kr-matter-to-se-cryonite"].order = "c"
data.raw.recipe["se-kr-matter-to-kr-imersite"].order = "d"
data.raw.recipe["se-kr-matter-to-se-beryllium-ore"].order = "e"
data.raw.recipe["se-kr-matter-to-se-holmium-ore"].order = "f"
data.raw.recipe["se-kr-matter-to-se-iridium-ore"].order = "g"
data.raw.recipe["kr-matter-to-kr-silicon"].order = "h"
data.raw.recipe["kr-matter-to-kr-glass"].order = "i"
data.raw.recipe["kr-matter-to-iron-plate"].order = "j"
data.raw.recipe["kr-matter-to-steel-plate"].order = "k"
data.raw.recipe["kr-matter-to-copper-plate"].order = "l"
data.raw.recipe["kr-matter-to-kr-rare-metals"].order = "m"
data.raw.recipe["kr-matter-to-sulfur"].order = "n"
data.raw.recipe["kr-matter-to-plastic-bar"].order = "o"

-- Science Tab
-- Unifying Science pack ordering. Must remain in Phase 2 to override K2 changes in Phase 2
data.raw.tool["automation-science-pack"].order = "b02[automation-tech-card]"
data.raw.tool["logistic-science-pack"].order = "b03[logistic-tech-card]"
data.raw.tool["military-science-pack"].order = "b04[military-tech-card]"
data.raw.tool["chemical-science-pack"].order = "b05[chemical-tech-card]"
data.raw.tool["se-rocket-science-pack"].order = "c[rocket-science-pack]"
data.raw.tool["space-science-pack"].order = "d[space-sciecne-pack]"
data.raw.tool["production-science-pack"].order = "e[production-science-pack]"
data.raw.tool["utility-science-pack"].order = "f[production-science-pack]"
data.raw.tool["kr-optimization-tech-card"].order  = "g[optimization-tech-card-1]-a"

-- Equipment & Combat Tab

-- Equipment Ordering (for displaying what equipment goes in what)

data.raw["generator-equipment"]["kr-small-portable-generator-equipment"].order = "a[generator]-a[small-portable-generator]"
data.raw["generator-equipment"]["kr-portable-generator-equipment"].order = "a[generator]-b[portable-generator]"
data.raw["generator-equipment"]["fission-reactor-equipment"].order = "a[generator]-d[fusion-reactor]"
data.raw["generator-equipment"]["kr-antimatter-reactor-equipment"].order = "a[generator]-e[antimatter-reactor]"
data.raw["generator-equipment"]["se-rtg-equipment"].order = "a[generator]-f[se-rtg-1]"
data.raw["generator-equipment"]["se-fusion-reactor-equipment"].order = "a[generator]-g[se-rtg-2]"

data.raw["solar-panel-equipment"]["solar-panel-equipment"].order = "a[generator]-h[solar-panel]"
data.raw["solar-panel-equipment"]["kr-big-solar-panel-equipment"].order = "a[generator]-i[big-solar-panel]"
data.raw["solar-panel-equipment"]["kr-superior-solar-panel-equipment"].order = "a[generator]-j[imersite-solar-panel]"
data.raw["solar-panel-equipment"]["kr-big-superior-solar-panel-equipment"].order = "a[generator]-k[big-imersite-solar-panel]"

data.raw["battery-equipment"]["kr-energy-absorber-equipment"].order = "b[battery]-a[energy-absorber]"
data.raw["battery-equipment"]["battery-equipment"].order = "b[battery]-b[battery]"
data.raw["battery-equipment"]["kr-big-battery-equipment"].order = "b[battery]-c[big-battery]"
data.raw["battery-equipment"]["battery-mk2-equipment"].order = "b[battery]-d[batter-mk2]"
data.raw["battery-equipment"]["kr-big-battery-mk2-equipment"].order = "b[battery]-e[big-battery-mk2]"
data.raw["battery-equipment"]["kr-battery-mk3-equipment"].order = "b[battery]-f[battery-mk3]"
data.raw["battery-equipment"]["kr-big-battery-mk3-equipment"].order = "b[battery]-g[big-battery-mk3]"

data.raw["energy-shield-equipment"]["se-adaptive-armour-equipment-1"].order = "c[defense]-a[se-adaptive-armour-1]"
data.raw["energy-shield-equipment"]["se-adaptive-armour-equipment-2"].order = "c[defense]-b[se-adaptive-armour-2]"
data.raw["energy-shield-equipment"]["se-adaptive-armour-equipment-3"].order = "c[defense]-c[se-adaptive-armour-3]"
data.raw["energy-shield-equipment"]["se-adaptive-armour-equipment-4"].order = "c[defense]-d[se-adaptive-armour-4]"
data.raw["energy-shield-equipment"]["se-adaptive-armour-equipment-5"].order = "c[defense]-e[se-adaptive-armour-5]"
data.raw["energy-shield-equipment"]["energy-shield-equipment"].order = "c[defense]-f[energy-shield]"
data.raw["energy-shield-equipment"]["energy-shield-mk2-equipment"].order = "c[defense]-g[energy-shield-mk2]"
data.raw["energy-shield-equipment"]["energy-shield-mk3-equipment"].order = "c[defense]-h[energy-shield-mk3]"
data.raw["energy-shield-equipment"]["energy-shield-mk4-equipment"].order = "c[defense]-i[energy-shield-mk4]"
data.raw["energy-shield-equipment"]["energy-shield-mk5-equipment"].order = "c[defense]-j[energy-shield-mk5]"
data.raw["energy-shield-equipment"]["energy-shield-mk6-equipment"].order = "c[defense]-k[energy-shield-mk6]"

data.raw["movement-bonus-equipment"]["exoskeleton-equipment"].order = "d[movement]-a[exoskeleton]"
data.raw["movement-bonus-equipment"]["kr-advanced-exoskeleton-equipment"].order = "d[movement]-b[advanced-exoskeleton]"
data.raw["movement-bonus-equipment"]["kr-superior-exoskeleton-equipment"].order = "d[movement]-c[superior-exoskeleton]"
data.raw["movement-bonus-equipment"]["kr-additional-engine-equipment"].order = "d[movement]-d[additional-engine]"
data.raw["movement-bonus-equipment"]["kr-advanced-additional-engine-equipment"].order = "d[movement]-e[advanced-additional-engine]"

data.raw["battery-equipment"]["jetpack-1"].order = "d[movement]-f[jetpack-1]"
data.raw["battery-equipment"]["jetpack-2"].order = "d[movement]-g[jetpack-2]"
data.raw["battery-equipment"]["jetpack-3"].order = "d[movement]-h[jetpack-3]"
data.raw["battery-equipment"]["jetpack-4"].order = "d[movement]-i[jetpack-4]"

data.raw["belt-immunity-equipment"]["belt-immunity-equipment"].order = "d[movement]-j[belt-immunity]"

data.raw["night-vision-equipment"]["night-vision-equipment"].order = "e[utility]-a[night-vision]"
data.raw["night-vision-equipment"]["kr-superior-night-vision-equipment"].order = "e[utility]-b[imersite-night-vision]"
data.raw["roboport-equipment"]["personal-roboport-equipment"].order = "e[utility]-c[personal-roboport]"
data.raw["roboport-equipment"]["personal-roboport-mk2-equipment"].order = "e[utility]-d[personal-roboport-mk2]"
data.raw["roboport-equipment"]["kr-vehicle-roboport-equipment"].order = "e[utility]-e[vehicle-roboport]"
data.raw["inventory-bonus-equipment"]["se-lifesupport-equipment-1"].order = "e[utility]-f[se-lifesupport-1]"
data.raw["inventory-bonus-equipment"]["se-lifesupport-equipment-2"].order = "e[utility]-g[se-lifesupport-2]"
data.raw["inventory-bonus-equipment"]["se-lifesupport-equipment-3"].order = "e[utility]-h[se-lifesupport-3]"
data.raw["inventory-bonus-equipment"]["se-lifesupport-equipment-4"].order = "e[utility]-i[se-lifesupport-4]"

data.raw["active-defense-equipment"]["kr-personal-laser-defense-mk2-equipment"].order = "f[damageing]-f[laser-mk2]"
data.raw["active-defense-equipment"]["kr-personal-laser-defense-mk3-equipment"].order = "f[damageing]-g[laser-mk3]"
data.raw["active-defense-equipment"]["kr-personal-laser-defense-mk4-equipment"].order = "f[damageing]-h[laser-mk4]"
data.raw["active-defense-equipment"]["discharge-defense-equipment"].order = "f[damageing]-i[discharge]"