fix(light-server): last fix
This commit is contained in:
parent
aaf40e2e77
commit
37c2491422
@ -11,7 +11,7 @@ local MAIN_OUTPUT_SIDE = 'left'
|
|||||||
local SECONDARY_INPUT_SIDE = 'back'
|
local SECONDARY_INPUT_SIDE = 'back'
|
||||||
local SECONDARY_OUTPUT_SIDE = 'front'
|
local SECONDARY_OUTPUT_SIDE = 'front'
|
||||||
|
|
||||||
local VERSION = '1.0.3'
|
local VERSION = '1.0.4'
|
||||||
|
|
||||||
local function getMainColorsOrder()
|
local function getMainColorsOrder()
|
||||||
return {
|
return {
|
||||||
@ -110,7 +110,6 @@ local function mainLoop()
|
|||||||
|
|
||||||
while true do
|
while true do
|
||||||
os.pullEvent('light_command_main')
|
os.pullEvent('light_command_main')
|
||||||
table.remove(mainLoopQueue, 1)
|
|
||||||
applyMainCommand(mainOutput)
|
applyMainCommand(mainOutput)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -120,7 +119,6 @@ local function secondaryLoop()
|
|||||||
|
|
||||||
while true do
|
while true do
|
||||||
os.pullEvent('light_command_secondary')
|
os.pullEvent('light_command_secondary')
|
||||||
table.remove(secondaryLoopQueue, 1)
|
|
||||||
applySecondaryCommand(secondaryOutput)
|
applySecondaryCommand(secondaryOutput)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -135,11 +133,13 @@ local function redstoneLoop()
|
|||||||
|
|
||||||
if mainState ~= newMainState then
|
if mainState ~= newMainState then
|
||||||
mainState = newMainState
|
mainState = newMainState
|
||||||
|
table.insert(mainLoopQueue, newMainState)
|
||||||
os.queueEvent('light_command_main', newMainState)
|
os.queueEvent('light_command_main', newMainState)
|
||||||
end
|
end
|
||||||
|
|
||||||
if secondaryState ~= newSecondaryState then
|
if secondaryState ~= newSecondaryState then
|
||||||
secondaryState = newSecondaryState
|
secondaryState = newSecondaryState
|
||||||
|
table.insert(mainLoopQueue, newSecondaryState)
|
||||||
os.queueEvent('light_command_secondary', newSecondaryState)
|
os.queueEvent('light_command_secondary', newSecondaryState)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user