diff --git a/light-server.lua b/light-server.lua index 469ea83..27108bd 100644 --- a/light-server.lua +++ b/light-server.lua @@ -11,7 +11,7 @@ local MAIN_OUTPUT_SIDE = 'left' local SECONDARY_INPUT_SIDE = 'back' local SECONDARY_OUTPUT_SIDE = 'front' -local VERSION = '1.0.3' +local VERSION = '1.0.4' local function getMainColorsOrder() return { @@ -110,7 +110,6 @@ local function mainLoop() while true do os.pullEvent('light_command_main') - table.remove(mainLoopQueue, 1) applyMainCommand(mainOutput) end end @@ -120,7 +119,6 @@ local function secondaryLoop() while true do os.pullEvent('light_command_secondary') - table.remove(secondaryLoopQueue, 1) applySecondaryCommand(secondaryOutput) end end @@ -135,11 +133,13 @@ local function redstoneLoop() if mainState ~= newMainState then mainState = newMainState + table.insert(mainLoopQueue, newMainState) os.queueEvent('light_command_main', newMainState) end if secondaryState ~= newSecondaryState then secondaryState = newSecondaryState + table.insert(mainLoopQueue, newSecondaryState) os.queueEvent('light_command_secondary', newSecondaryState) end