hopefully fix "too long without yielding" error for throttles

This commit is contained in:
2026-06-25 14:29:14 -05:00
parent 6668a99f28
commit f15b8dc2ef

View File

@@ -176,17 +176,17 @@ function ThrottleInit()
local initialStates = getRelayStates()
while true do
local currentStates = getRelayStates()
os.pullEvent("redstone")
for pname, currentState in pairs(currentStates) do
local initialState = initialStates[pname]
for k, v in pairs(currentState) do
if initialState[k] ~= v then
Throttles[throttleType].name = pname
Throttles[throttleType].side = k
return
end
local currentStates = getRelayStates()
for pname, currentState in pairs(currentStates) do
local initialState = initialStates[pname]
for k, v in pairs(currentState) do
if initialState[k] ~= v then
Throttles[throttleType].name = pname
Throttles[throttleType].side = k
return
end
end
end