From 6b96927b233c23c928034f95f84116bcb3355fc1 Mon Sep 17 00:00:00 2001 From: EvilFactory Date: Wed, 17 May 2023 10:14:16 -0300 Subject: [PATCH] Added docs for the util functions and fixed timer docs --- luacs-docs/lua/lua/Timer.lua | 4 ++-- luacs-docs/lua/lua/Util.lua | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 luacs-docs/lua/lua/Util.lua diff --git a/luacs-docs/lua/lua/Timer.lua b/luacs-docs/lua/lua/Timer.lua index 1a4a33cb6..fbd91ccdd 100644 --- a/luacs-docs/lua/lua/Timer.lua +++ b/luacs-docs/lua/lua/Timer.lua @@ -17,9 +17,9 @@ function Timer.GetTime() end -- @realm shared function Timer.Wait(func, milliseconds) end ---- Calls a function after a certain amount of time. +--- Calls a function in the next frame -- @realm shared -function Timer.GetUsageMemory() end +function Timer.NextFrame(func) end --- Same as GetTime() -- @realm shared diff --git a/luacs-docs/lua/lua/Util.lua b/luacs-docs/lua/lua/Util.lua new file mode 100644 index 000000000..6cac85e40 --- /dev/null +++ b/luacs-docs/lua/lua/Util.lua @@ -0,0 +1,17 @@ +-- luacheck: ignore 111 + +--[[-- +Class providing several util functions. +]] +-- @code Util +-- @pragma nostrip + +local Util = {} + +--- Returns a table with all items that have the given identifier. +-- @realm shared +Util.GetItemsById = function (id) end + +--- Returns the Client that is currently controlling the Character, returns nil if no Client is controlling the Character. +-- @realm shared +Util.FindClientCharacter = function (character) end \ No newline at end of file