local S = minetest.get_translator("default")

dofile(minetest.get_modpath("default") .. "/deoxidizer.lua")
dofile(minetest.get_modpath("default") .. "/specialitems.lua")

-- General Nodes

minetest.register_node("default:mars_stone", {
  description = S("Mars Stone"),
  tiles = {"default_mars_stone.png"},
  groups = {picky = 5, stone = 1, oxidized_stone = 1},
  drop = "default:mars_stone",
})

minetest.register_node("default:proxima_stone", {
  description = "Proxima Stone",
  tiles = {"default_proxima_stone.png"},
  groups = {picky = 5, stone = 1, oxidized_stone = 1},
  drop = "default:proxima_stone",
})

minetest.register_node("default:proxima_sand", {
  description = "Proxima Stone",
  tiles = {"default_proxima_sand.png"},
  groups = {spady = 1, sand = 1, falling_node = 1},
  drop = "default:proxima_sand",
})

minetest.register_node("default:little_proxima_stone", {
  description = "Little Proxima Stone",
  tiles = {"default_proxima_stone.png"},
  groups = {picky = 3, handy = 3, stone = 1, little_oxidized_stone = 1},
  drop = "default:little_proxima_stone",
  drawtype = "nodebox",
  node_box = {
	type = "fixed",
	fixed = {
		{-0.2500, -0.5000, -0.1563, 0.2500, -0.3750, 0.1563}
	 }
 },
 is_ground_content = true,
 legacy_mineral = true,
})

minetest.register_node("default:alienflower", {
  description = "Alienflower",
  tiles = {"default_alienflower.png"},
  drawtype = "plantlike",
  inventory_image = "default_alienflower.png",
  on_use = minetest.item_eat(2),
  groups = {snappy = 2},
  light_source = 9,
	selection_box = {
		type = "fixed",
		fixed = { -3/16, -0.5, -3/16, 3/16, -2/16, 3/16 },
	},
})

--General Items

minetest.register_craftitem("default:proxima_stone_stick", {
  description = "Stone Stick",
  inventory_image = "default_stone_stick.png",
  groups = {sticks = 1,},
})

-- Topas

minetest.register_craftitem("default:topas", {
  description = "Topas",
  inventory_image = "default_topas.png",
  groups = {topas = 1, mineral = 1},
})

minetest.register_craftitem("default:blue_topas", {
  description = "Blue Topas",
  inventory_image = "default_blue_topas.png",
  groups = {topas = 1, mineral = 1},
})

minetest.register_craftitem("default:red_topas", {
  description = "Red Topas",
  inventory_image = "default_red_topas.png",
  groups = {topas = 1, mineral = 1},
})

minetest.register_craftitem("default:yellow_topas", {
  description = "Yellow Topas",
  inventory_image = "default_yellow_topas.png",
  groups = {topas = 1, mineral = 1},
})

minetest.register_craftitem("default:orange_topas", {
  description = "Orange Topas",
  inventory_image = "default_orange_topas.png",
  groups = {topas = 1, mineral = 1},
})
minetest.register_craftitem("default:grey_topas", {
  description = "Grey Topas",
  inventory_image = "default_grey_topas.png",
  groups = {topas = 1, mineral = 1},
})
minetest.register_craftitem("default:purple_topas", {
  description = "Purple Topas",
  inventory_image = "default_purple_topas.png",
  groups = {topas = 1, mineral = 1},
})
minetest.register_craftitem("default:pink_topas", {
  description = "Pink Topas",
  inventory_image = "default_pink_topas.png",
  groups = {topas = 1, mineral = 1},
})
minetest.register_craftitem("default:brown_topas", {
  description = "Brown Topas",
  inventory_image = "default_brown_topas.png",
  groups = {topas = 1, mineral = 1},
})
minetest.register_craftitem("default:green_topas", {
  description = "Green Topas",
  inventory_image = "default_green_topas.png",
  groups = {topas = 1, mineral = 1},
})


-- Craft

minetest.register_craft({
    type = "shaped",
    output = "default:proxima_stone_stick 8",
    recipe = {
        {"default:little_proxima_stone",},
        {"default:little_proxima_stone",},
    }
})

minetest.register_craft({
    type = "shaped",
    output = "default:proxima_stone_stick 9",
    recipe = {
        {"default:proxima_stone",},
    }
})

minetest.register_craft({
    type = "shaped",
    output = "default:proxima_stone",
    recipe = {
        {"default:proxima_stone_stick", "default:proxima_stone_stick", "default:proxima_stone_stick",},
        {"default:proxima_stone_stick", "default:proxima_stone_stick", "default:proxima_stone_stick",},
        {"default:proxima_stone_stick", "default:proxima_stone_stick", "default:proxima_stone_stick",},
    }
})
