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

std::vector<IndicatorLights::Sprite> IndicatorLights::makeSprites()
{
    std::vector<Sprite> sprites;

    for (uint8_t meta = 0; meta < 16; meta++)
    {
        Sprite sprite = {
            {
                formatString("indicatorLights/state$+", (int) meta),
                formatString("indicatorLights/state$+", (int) meta),
                formatString("indicatorLights/state$+", (int) meta),
                formatString("indicatorLights/state$+", (int) meta),
                "casing/tin/data",
                "casing/tin/blank",
            },
            {{0, 0, 0, 8, 8, 8}},
            formatString("state$+", (int) meta),
        };

        sprites.push_back(sprite);
    }

    return sprites;
}

IndicatorLights::IndicatorLights(std::string name) :
    SpriteBlock(
        name,
        "Indicator Lights",
        60.0f,
        "indicatorLights/state15",
        makeSprites()
    )
{
    withMetalSounds();
}

bool IndicatorLights::canManuallyDig()
{
    return true;
}