From fedf6806266cd1f65c27ed2ec5fe4fb50d9f467f Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sat, 8 Feb 2025 22:08:20 -0500 Subject: [PATCH] Small action-queue.lua doc-comment tweaks --- src/action-queue.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/action-queue.lua b/src/action-queue.lua index a268e87..d21edab 100644 --- a/src/action-queue.lua +++ b/src/action-queue.lua @@ -18,8 +18,9 @@ actionQueue = { --- Added actions will be called on every runWaiting() update. --- They will continue to be executed until they return Succeeded or Failed instead of NeedsMoreTime. +--- --- 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 maxTimeMs number ---@param action Action @@ -34,7 +35,7 @@ function actionQueue.upsert(self, name, maxTimeMs, action) } 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. function actionQueue.runWaiting(self, deltaSeconds) local currentTimeMs = playdate.getCurrentTimeMilliseconds()