local armor_material = {
   gravity = 'epic:float_crystal',
   healing = 'epic:bloodstone',
   water = 'ocean:prismarine_crystals',
   fire = 'epic:huntite',
   speed = 'epic:garnet',
   jump = 'quartz:quartz_crystal_piece',
}

for name, mat in pairs(armor_material) do

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['epic:thennium'] = 5,
         ['group:fabric'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_helmet',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['epic:thennium'] = 8,
         ['group:fabric'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_chestplate',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['epic:thennium'] = 7,
         ['group:fabric'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_leggings',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['epic:thennium'] = 4,
         ['group:fabric'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_boots',
   })

--Adding Enchantments to existing armor
   stations.dual_register_recipe('crystal_w', {
      input = {
         ['armor:ros_helmet'] = 1,
         ['epic:thennium'] = 1,
         ['group:fabric'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_helmet',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['armor:ros_chestplate'] = 1,
         ['epic:thennium'] = 1,
         ['group:fabric'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_chestplate',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['armor:ros_leggings'] = 1,
         ['epic:thennium'] = 1,
         ['group:fabric'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_leggings',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['armor:ros_boots'] = 1,
         ['epic:thennium'] = 1,
         ['group:fabric'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_boots',
   })

--Enchanted Repairs
   stations.dual_register_recipe('crystal_w', {
      input = {
         ['epic:thennium'] = 1,
         ['armor:ros_'..name..'_helmet'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_helmet',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['epic:thennium'] = 1,
         ['armor:ros_'..name..'_chestplate'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_chestplate',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['epic:thennium'] = 1,
         ['armor:ros_'..name..'_leggings'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_leggings',
   })

   stations.dual_register_recipe('crystal_w', {
      input = {
         ['epic:thennium'] = 1,
         ['armor:ros_'..name..'_boots'] = 1,
         ['stations:chitin'] = 2,
         ['default:mese_crystal'] = 1,
         [mat] = 2,
      },
      output = 'armor:ros_'..name..'_boots',
   })

end

stations.dual_register_recipe('crystal_w', {
   input = {
      ['epic:thennium'] = 7,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_shield',
})

stations.dual_register_recipe('crystal_w', {
   input = {
      ['epic:thennium'] = 5,
      ['group:fabric'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_helmet',
})

stations.dual_register_recipe('crystal_w', {
   input = {
      ['epic:thennium'] = 8,
      ['group:fabric'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_chestplate',
})

stations.dual_register_recipe('crystal_w', {
   input = {
      ['epic:thennium'] = 7,
      ['group:fabric'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_leggings',
})

stations.dual_register_recipe('crystal_w', {
   input = {
      ['epic:thennium'] = 4,
      ['group:fabric'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_boots',
})

--Repairs

stations.dual_register_recipe('crystal_w', {
   input = {
      ['armor:ros_helmet'] = 1,
      ['epic:thennium'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_helmet',
})

stations.dual_register_recipe('crystal_w', {
   input = {
      ['armor:ros_chestplate'] = 1,
      ['epic:thennium'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_chestplate',
})

stations.dual_register_recipe('crystal_w', {
   input = {
      ['armor:ros_leggings'] = 1,
      ['epic:thennium'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_leggings',
})

stations.dual_register_recipe('crystal_w', {
   input = {
      ['armor:ros_boots'] = 1,
      ['epic:thennium'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_boots',
})

stations.dual_register_recipe('crystal_w', {
   input = {
      ['armor:ros_shield'] = 1,
      ['epic:thennium'] = 1,
      ['stations:chitin'] = 2,
   },
   output = 'armor:ros_shield',
})
