#ifndef SUBSTATION_HPP_
#define SUBSTATION_HPP_

#include <Block/SpriteBlock/MultiBlock/MultiBlock.hpp>
#include <Block/MachineBlockMixin.hpp>
#include <Machine/MSubstation/MSubstation.hpp>

class Substation : public MultiBlock, public MachineBlockMixin<MSubstation>
{
public:
    /*
        #            Substation Meta Byte
        +-------+---+---+---+---+---+---+---+---+
        | Bit   | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
        +-------+---+---+---+---+---+---+---+---+
        | Field |   |   |   |   | level | orient|
        +-------+---+---+---+---+---+---+---+---+

        orient
            The orientation of the multi-block structure.
        
        level
            The charge level of this substation.
    */

    Substation(std::string name);

    virtual void getHarvestedStacks(LocalWorld &world, glm::ivec3 pos, std::vector<ItemStack> &stacks) override;
    virtual void onInteract(LocalWorld &world, Player &player, glm::ivec3 pos, Side side, const RGBABytes &collisionKey) override;
};

#endif