From 86d4338e34cf673a61d48c72043128c1eadcfa72 Mon Sep 17 00:00:00 2001 From: annabunches Date: Tue, 30 Jul 2024 19:49:39 -0400 Subject: [PATCH] Fix error in event listener. --- abase-listeners.lua | 2 +- abase-sprite.lua | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/abase-listeners.lua b/abase-listeners.lua index c87f767..29c093c 100644 --- a/abase-listeners.lua +++ b/abase-listeners.lua @@ -3,7 +3,7 @@ local sprt = require "abase-sprite" -- recolors all layers in the current sprite local function RecolorLayers() for i, layer in ipairs(app.sprite.layers) do - sprt.setColor(layer) + sprt.SetColor(layer) end end diff --git a/abase-sprite.lua b/abase-sprite.lua index acc84fe..7b3fad8 100644 --- a/abase-sprite.lua +++ b/abase-sprite.lua @@ -74,14 +74,19 @@ end local function safeSetColor(layer, color) pixelValue = layer.color.rgbaPixel - +--[[ print("safeSetColor: " .. pixelValue) + print(BASE_COLOR.rgbaPixel) + print(IGNORE_COLOR.rgbaPixel) + print(IGNORE_SUBCOLOR.rgbaPixel) + print(MERGE_COLOR.rgbaPixel) + print(MERGE_SUBCOLOR.rgbaPixel) ]] if (pixelValue ~= BASE_COLOR.rgbaPixel and pixelValue ~= IGNORE_COLOR.rgbaPixel and pixelValue ~= IGNORE_SUBCOLOR.rgbaPixel and pixelValue ~= MERGE_COLOR.rgbaPixel and pixelValue ~= MERGE_SUBCOLOR.rgbaPixel) then - print("DEBUG: not setting color") - return +--[[ print("DEBUG: not setting color") + ]] return end layer.color = color end