local mod_storage = minetest.get_mod_storage()

anvils = {}

minetest.override_item("farming:hoe_diamond", {
  groups = {hoe=1, tool=1},
  _repair_material = "default:diamond"}
  )

minetest.override_item("default:pick_diamond", {
  groups = {pickaxe=1, tool=1},
  _repair_material = "default:diamond"}
  )

minetest.override_item("default:axe_diamond", {
  groups = {axe=1, tool=1},
  _repair_material = "default:diamond"}
  )

minetest.override_item("default:shovel_diamond", {
  groups = {shovel=1, tool=1},
  _repair_material = "default:diamond"}
  )

minetest.override_item("farming:hoe_wood", {
  groups = {hoe=1, tool=1, flammable=1},
  _repair_material = "default:wood"}
  )

minetest.override_item("default:pick_wood", {
  groups = {pick=1, tool=1, flammable=2},
  _repair_material = "default:wood"}
  )

minetest.override_item("default:axe_wood", {
  groups = {axe=1, tool=1},
  _repair_material = "default:wood"}
  )

minetest.override_item("default:shovel_wood", {
  groups = {shovel=1, tool=1, flammable=2},
  _repair_material = "default:wood"}
  )

minetest.override_item("farming:hoe_steel", {
  groups = {hoe=1, tool=1},
  _repair_material = "default:steel_ingot"}
  )

minetest.override_item("default:pick_steel", {
  groups = {pickaxe=1, tool=1},
  _repair_material = "default:steel_ingot"}
  )

minetest.override_item("default:axe_steel", {
  groups = {axe=1, tool=1},
  _repair_material = "default:steel_ingot"}
  )

minetest.override_item("default:shovel_steel", {
  groups = {shovel=1, tool=1},
  _repair_material = "default:steel_ingot"}
  )

minetest.override_item("farming:hoe_stone", {
  groups = {hoe=1, tool=1},
  _repair_material = "default:cobble"}
  )

minetest.override_item("default:pick_stone", {
  groups = {pickaxe=1, tool=1},
  _repair_material = "default:cobble"}
  )

minetest.override_item("default:axe_stone", {
  groups = {axe=1, tool=1},
  _repair_material = "default:cobble"}
  )

minetest.override_item("default:shovel_stone", {
  groups = {shovel=1, tool=1},
  _repair_material = "default:cobble"}
  )

minetest.override_item("farming:hoe_bronze", {
  groups = {hoe=1, tool=1},
  _repair_material = "default:bronze_ingot"}
  )

minetest.override_item("default:pick_bronze", {
  groups = {pickaxe=1, tool=1},
  _repair_material = "default:bronze_ingot"}
  )

minetest.override_item("default:axe_bronze", {
  groups = {axe=1, tool=1},
  _repair_material = "default:bronze_ingot"}
  )

minetest.override_item("default:shovel_bronze", {
  groups = {shovel=1, tool=1},
  _repair_material = "default:bronze_ingot"}
  )

minetest.override_item("farming:hoe_mese", {
  groups = {hoe=1, tool=1},
  _repair_material = "default:mese_crystal"}
  )

minetest.override_item("default:pick_mese", {
  groups = {pick=1, tool=1},
  _repair_material = "default:mese_crystal"}
  )

minetest.override_item("default:axe_mese", {
  groups = {axe=1, tool=1},
  _repair_material = "default:mese_crystal"}
  )

minetest.override_item("default:shovel_mese", {
  groups = {shovel=1, tool=1},
  _repair_material = "default:mese_crystal"}
  )

-- add swords for snappy nodes
minetest.override_item("default:sword_wood", {
  groups = {weapon=1, sword=1, flammable=1},
  _repair_material = "default:wood"}
	)

minetest.override_item("default:sword_stone", {
  groups = {weapon=1, sword=1},
  _repair_material = "default:cobble"}
	)

minetest.override_item("default:sword_steel", {
  groups = {weapon=1, sword=1},
  _repair_material = "default:steel_ingot"}
	)

minetest.override_item("default:sword_bronze", {
  groups = {weapon=1, sword=1},
  _repair_material = "default:bronze_ingot"}
	)

minetest.override_item("default:sword_mese", {
  groups = {weapon=1, sword=1},
  _repair_material = "default:mese_crystal"}
	)

minetest.override_item("default:sword_diamond", {
  groups = {weapon=1, sword=1},
  _repair_material = "default:diamond"}
	)
