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

@@ -175,18 +175,18 @@ function ThrottleInit()
print("\nPlease change the input signal for the throttle.")
local initialStates = getRelayStates()
while true do
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
os.pullEvent("redstone")
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