Small action-queue.lua doc-comment tweaks

This commit is contained in:
Sage Vaillancourt 2025-02-08 22:08:20 -05:00
parent 82d1dac5de
commit fedf680626
1 changed files with 3 additions and 2 deletions

View File

@ -18,8 +18,9 @@ actionQueue = {
--- Added actions will be called on every runWaiting() update. --- Added actions will be called on every runWaiting() update.
--- They will continue to be executed until they return Succeeded or Failed instead of NeedsMoreTime. --- They will continue to be executed until they return Succeeded or Failed instead of NeedsMoreTime.
---
--- Replaces any existing action with the given name. --- Replaces any existing action with the given name.
--- If the first call of action() doesn't return NeedsMoreTime, will skip adding to the queue. --- If the initial call of action() doesn't return NeedsMoreTime, this function will not bother adding it to the queue.
---@param name string ---@param name string
---@param maxTimeMs number ---@param maxTimeMs number
---@param action Action ---@param action Action
@ -34,7 +35,7 @@ function actionQueue.upsert(self, name, maxTimeMs, action)
} }
end end
--- Must call on every playdate.update() to check for (and run) any waiting tasks. --- Must be called on every playdate.update() to check for (and run) any waiting tasks.
--- Actions that return NeedsMoreTime will not be removed from the queue unless they have expired. --- Actions that return NeedsMoreTime will not be removed from the queue unless they have expired.
function actionQueue.runWaiting(self, deltaSeconds) function actionQueue.runWaiting(self, deltaSeconds)
local currentTimeMs = playdate.getCurrentTimeMilliseconds() local currentTimeMs = playdate.getCurrentTimeMilliseconds()