for i = 1, 3 do
   minetest.register_craftitem('sss_items:rations_'..i, {
      description = 'Space Rations',
      inventory_image = 'sss_items_rations_'..i..'.png',
      on_use = minetest.item_eat(i*2),
   })
end
