From 93dd76efec9113ad414954a537931b836cbcb10f Mon Sep 17 00:00:00 2001 From: lili-ffxi <40600148+lili-ffxi@users.noreply.github.com> Date: Wed, 17 Feb 2021 13:59:52 +0000 Subject: [PATCH] Minor change to functions.schedule Functions.schedule now returns the coroutine created by coroutine.schedule. --- addons/libs/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/libs/functions.lua b/addons/libs/functions.lua index eaefbd7fb..5dc15f300 100644 --- a/addons/libs/functions.lua +++ b/addons/libs/functions.lua @@ -145,9 +145,9 @@ function functions.it(fn, ...) end end --- Schedules the current function to run delayed by the provided time in seconds +-- Schedules the current function to run delayed by the provided time in seconds and returns the coroutine function functions.schedule(fn, time, ...) - coroutine.schedule(fn:prepare(...), time) + return coroutine.schedule(fn:prepare(...), time) end -- Returns a function that, when called, will execute the underlying function delayed by the provided number of seconds @@ -495,7 +495,7 @@ function string.map(str, fn) end --[[ -Copyright © 2013-2015, Windower +Copyright © 2013-2015, Windower All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: