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_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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user