#ifndef MELECTRIC_LAMP_HPP_
#define MELECTRIC_LAMP_HPP_

#include <Machine/Machine.hpp>
#include <Machine/IElectricMachine.hpp>

/**
 * @brief The electric lamp machine.
 */
class MElectricLamp : public Machine, public IElectricMachine
{
private:
    int ticksLeft;

public:
    MElectricLamp(LocalWorld &world, glm::ivec3 pos);

    virtual void serializeState(std::vector<uint8_t> &outBytes) override;
    virtual void deserializeState(const uint8_t *data, size_t size) override;
    virtual void update() override;

    virtual bool canConnectElectricWire(Side side) override;
};

#endif