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