Hiveworkshop 的 Precise Wait (GUI-friendly) 工具更新记录
Precise Wait (GUI-friendly)
Hiveworkshop 上的 Precise Wait (GUI-friendly) 工具经多次更新,2019 年 7 月 8 日起兼容默认休眠脚本,2022 年 6 月 6 日改用 Hook 5.0 并支持 WaitIndex。该工具 2022 年 10 月 17 日改用 Global Initialization 的 Require 功能,不再依赖 OnLibraryInit。
Edit 8 July 2019: For reasons related to compatibility, it is also necessary to override the default scripts which normally sleep the thread (ie. TriggerSleepAction and SyncSelections). It is safe to do either one from an ExecuteFunc thread, so I've updated the script. Regular sleep now defaults to the same PolledWait behavior.
Edit 10 July 2019 - Added compatibility to force-enable Wait functions even when using Lua Fast Triggers. Bear in mind the function "EnableWaits" is actually found within the Fast Triggers script and not this one.
Edit 7 April 2022 - Updated requirement to new version of TimerUtils, opened up the API to allow the user to call the original TriggerSleepAction if they wish.
Edit 16 April 2022 - Updated requirement to use Hook.
Edit 18 April 2022 - Updated to require Hook 3.4.
Edit 22 April 2022 - No longer requires TimerUtils.
Edit 5 May 2022 - Now works correctly with the newer version of Hook. Thanks @Jampion !
Edit 6 June 2022 - Updated to use Hook 5.0, add support for "WaitIndex" which Global Variable Remapper turns into returning the value of "coroutine.running()" in order to ensure the index is unique to that set of triggeractions. The cleanup is tricky with this without setting values to nil, so I recommend using GUI Repair Kit to make sure your arrays (tables) get cleaned up when the thread execution has ended.
Edit 7 July 2022 - Fixed the issue created when switching to coroutine.wrap, as I had mistakenly thought the function would create a new thread each time (it doesn't, so I've reverted it). Also fixed the issue where the return value of the hooked triggeraction was forgotten.
5 Oct 2022 - Now uses OnLibraryInit and treats AddHook as an optional requirement.
17 Oct 2022 - Now uses the Require functionality added to Global Initialization instead of OnLibraryInit.
来源:Hiveworkshop · hiveworkshop.com