mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-29 02:13:01 +00:00
doc updates
This commit is contained in:
parent
112364e767
commit
41577de416
1 changed files with 12 additions and 12 deletions
|
@ -80,8 +80,8 @@ setmetatable(Notify, {__call = call})
|
|||
-- @param string name The name of the player to send the notification to.
|
||||
-- @param string ntype The type of notification.
|
||||
-- @param string message The message to send.
|
||||
-- @param string colour optional): The colour of the notification.
|
||||
-- @param message_coloured boolean? Optional. Whether the message should be coloured.
|
||||
-- @param string? colour Optional. The colour of the notification.
|
||||
-- @param boolean? message_coloured Optional. Whether the message should be coloured.
|
||||
-- @return boolean True if all parameters are valid, false otherwise.
|
||||
-- @example Predefined notification types
|
||||
-- Notify.custom(name, "custom", "This one is magenta!", "#FF00FF", true)
|
||||
|
@ -115,10 +115,10 @@ do
|
|||
end
|
||||
|
||||
--- Local suppression status handler
|
||||
-- - @param name <string>: The name of the player to check.
|
||||
-- - @param suppress <table>: The table of suppressed players.
|
||||
-- - @return <boolean>: True if the player is not suppressed or
|
||||
-- - - if the player is clear(ed), false otherwise.
|
||||
-- @param string name The name of the player to check.
|
||||
-- @param table suppress The table of suppressed players.
|
||||
-- @return boolean True if the player is not suppressed or
|
||||
-- if the player is clear(ed), false otherwise.
|
||||
local check_clear_suppressed = function(name, suppress)
|
||||
if suppress[name] then
|
||||
if type(suppress[name]) == "function" then return false end
|
||||
|
@ -130,9 +130,9 @@ local check_clear_suppressed = function(name, suppress)
|
|||
end
|
||||
|
||||
--- Suppress a player's notifications.
|
||||
-- - @param name <string>: The name of the player to suppress.
|
||||
-- - @param time <number > 1>: The number of seconds to suppress notifications for.
|
||||
-- - - number < 1 immediately removes the suppression.
|
||||
-- @param string name The name of the player to suppress.
|
||||
-- @param number > 1 time The number of seconds to suppress notifications for.
|
||||
-- number < 1 immediately removes the suppression.
|
||||
function Notify.suppress_for_player(name, time)
|
||||
local suppress = globalstate.suppress
|
||||
-- If the player is already suppressed, cancel it unless it's a function
|
||||
|
|
Loading…
Reference in a new issue