mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 17:12:59 +00:00
more doc refixes
This commit is contained in:
parent
63bdbdfac9
commit
0ffdb47b54
1 changed files with 9 additions and 9 deletions
|
@ -13,8 +13,8 @@ end
|
||||||
local validate = {}
|
local validate = {}
|
||||||
|
|
||||||
--- Validate name
|
--- Validate name
|
||||||
-- @param string name The name of the player to validate.
|
-- @param name string The name of the player to validate.
|
||||||
-- @returns boolean True if the name is valid, false otherwise.
|
-- @returns boolean True if the name is valid, false otherwise.
|
||||||
validate.name = function(name)
|
validate.name = function(name)
|
||||||
if type(name) ~= "string" then
|
if type(name) ~= "string" then
|
||||||
log_error(tostring(name) .. " is a " .. type(name) .. " not a string.\n")
|
log_error(tostring(name) .. " is a " .. type(name) .. " not a string.\n")
|
||||||
|
@ -30,13 +30,13 @@ validate.name = function(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Validate message
|
--- Validate message
|
||||||
-- @param string message The message to validate.
|
-- @param message string The message to validate.
|
||||||
-- @returns boolean True if the message is a string, false otherwise.
|
-- @returns boolean True if the message is a string, false otherwise.
|
||||||
validate.message = function(message) return type(message) == "string" end
|
validate.message = function(message) return type(message) == "string" end
|
||||||
|
|
||||||
--- Validate colour
|
--- Validate colour
|
||||||
-- @param string colour The colour to validate.
|
-- @param colour string The colour to validate.
|
||||||
-- @returns boolean True if the colour is valid, false otherwise.
|
-- @returns boolean True if the colour is valid, false otherwise.
|
||||||
validate.colour = function(colour)
|
validate.colour = function(colour)
|
||||||
return ( type(colour) == "string" and
|
return ( type(colour) == "string" and
|
||||||
colour:match("^#%x+$") and
|
colour:match("^#%x+$") and
|
||||||
|
@ -44,9 +44,9 @@ validate.colour = function(colour)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Validate all
|
--- Validate all
|
||||||
-- @param string name The name of the player to validate.
|
-- @param name string The name of the player to validate.
|
||||||
-- @param string message The message to validate.
|
-- @param message string The message to validate.
|
||||||
-- @param string colour The colour to validate.
|
-- @param colour string The colour to validate.
|
||||||
-- @returns boolean, table|nil Returns the validation status, followed by details of the failure if bool == false.
|
-- @returns boolean, table|nil Returns the validation status, followed by details of the failure if bool == false.
|
||||||
-- | Return arg | Meaning |
|
-- | Return arg | Meaning |
|
||||||
-- |------------|---------|
|
-- |------------|---------|
|
||||||
|
|
Loading…
Reference in a new issue