#include <BlockRegistry/BlockRegistry.hpp>
#include <GraphicsContext/GraphicsContext.hpp>
#include <Material/Material.hpp>
#include <Milestone/DiggingDeeperMilestone/DiggingDeeperMilestone.hpp>
#include <Color/Color.hpp>
#include <Milestone/MetalWorkingMilestone/MetalWorkingMilestone.hpp>

const std::string DiggingDeeperMilestone::ID = "main:DiggingDeeper";

DiggingDeeperMilestone::DiggingDeeperMilestone() :
    Milestone(
        Material::diamond,
        Material::diamond,
        "Digging Deeper"
    )
{
    addAchievement(
        MineDiamonds,
        blockRegistry.getBlockByName("main:diamondOreX").iconMaterial,
        Material::diamond,
        "Mine diamonds",
        "*Select the {item|main:steelPickaxe} in the sidebar.\n"
        "*Find {block|main:diamondOreX} underground and collect it.\n"
        "*Process the ore in a {machine|main:grindingBowl} or {machine|main:macerator}.\n"
        "@itemProc|main:grindingBowl|main:diamondOreX|1|main:diamond|1\n"
        "@itemProc|main:macerator|main:diamondOreX|1|main:diamond|2\n",
        Dependency{MetalWorkingMilestone::ID, MetalWorkingMilestone::SteelPickaxe}
    );

    addAchievement(
        DiamondPickaxe,
        Material::diamondPickaxe,
        Material::diamondPickaxe,
        "Construct the diamond pickaxe",
        "*{action|Construct} the {item|main:diamondPickaxe}.\n"
        "@constructTable|main:diamondPickaxe|1|main:diamond|3|main:stick|8\n",
        Dependency{ID, MineDiamonds}
    );

    addAchievement(
        ElectricDrill,
        Material::electricDrill,
        Material::electricDrill,
        "Construct the electric drill",
        "*{action|Construct} the {item|main:electricDrill}.\n"
        "@engTable|main:electricDrill|1|main:diamond|32|main:battery|2|main:steelIngot|8|main:copperWire|8\n",
        Dependency{ID, MineDiamonds}
    );

    addAchievement(
        ChargeElectricDrill,
        Material::electricDrill,
        Material::electricDrill,
        "Charge the electric drill",
        "*Place the {item|main:electricDrill} in the {rechargeSlot} of a generator, e.g. a "
        "{machine|main:steamGenerator} or {machine|main:combustionGenerator}.\n"
        "Take out the charged {item|main:electricDrill}.",
        Dependency{ID, ElectricDrill}
    );

    addAchievement(
        BreakRingwooditeLayer,
        blockRegistry.getBlockByName("main:ringwoodite").iconMaterial,
        blockRegistry.getBlockByName("main:ringwoodite").iconMaterial,
        "Break through the ringwoodite layer",
        "*128 blocks below the sea level, there is a layer of {block|main:ringwoodite}.\n"
        "*Use a charged {item|main:electricDrill} to mine through the layer.\n"
        "*Explore the depths below!",
        Dependency{ID, ChargeElectricDrill}
    );
}