#ifndef DYNAMO_HPP_
#define DYNAMO_HPP_

#include <Block/SpriteBlock/SpriteBlock.hpp>
#include <Block/MachineBlockMixin.hpp>
#include <Machine/MDynamo/MDynamo.hpp>

class Dynamo : public SpriteBlock, public MachineBlockMixin<MDynamo>
{
private:
    /*
        #            Dynamo Meta Byte
        +-------+---+---+---+---+---+---+---+---+
        | Bit   | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
        +-------+---+---+---+---+---+---+---+---+
        | Field |   |   |   |   |   |   | state |
        +-------+---+---+---+---+---+---+---+---+

        state
            The state, used for the animation of the handle turning.
    */

    static std::vector<Sprite> makeSprites();

public:
    Dynamo(std::string name);

    virtual bool canManuallyDig() override;
    virtual void onInteract(LocalWorld &world, Player &player, glm::ivec3 pos, Side side, const RGBABytes &collisionKey) override;
};

#endif