mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 10:21:45 -04:00
bad timer bug fix: event timers should default to once
This commit is contained in:
parent
8f9eabc84e
commit
807dfb7224
@ -20,7 +20,7 @@ function event.register(key, callback, interval, times)
|
||||
local handler =
|
||||
{
|
||||
key = key,
|
||||
times = times or math.huge,
|
||||
times = times or 1,
|
||||
callback = callback,
|
||||
interval = interval or math.huge,
|
||||
}
|
||||
@ -155,7 +155,7 @@ function event.listen(name, callback)
|
||||
return false
|
||||
end
|
||||
end
|
||||
return event.register(name, callback)
|
||||
return event.register(name, callback, math.huge, math.huge)
|
||||
end
|
||||
|
||||
function event.onError(message)
|
||||
|
Loading…
x
Reference in New Issue
Block a user