#ifndef DIRT_HPP_
#define DIRT_HPP_

#include <Block/SpriteBlock/BasicBlock/BasicBlock.hpp>

class Dirt : public BasicBlock
{
private:
    static constexpr int grassSpreadTicksMin = 60 * 60 * 6;
    static constexpr int grassSpreadTicksRange = 60 * 60 * 18;

    static constexpr uint32_t sigGrassCheck = 1;

    void scheduleGrassCheck(LocalWorld &world, glm::ivec3 pos);

public:
    Dirt(std::string name);

    virtual bool canManuallyDig() override;
    virtual void onNeighborUpdated(LocalWorld &world, glm::ivec3 pos, Side side) override;
    virtual void onPlaced(LocalWorld &world, Chunk &chunk, glm::ivec3 pos) override;
    virtual void onSignal(LocalWorld &world, glm::ivec3 pos, uint32_t code) override;
    virtual Sound& getManualDiggingSound() override;
};

#endif