Ldoc compliant

This commit is contained in:
Cooldude2606
2019-05-29 22:24:04 +01:00
parent 53f9c51c0e
commit e187059ae0
94 changed files with 15315 additions and 479 deletions

View File

@@ -36,9 +36,9 @@ local function event_emit(event,player,by_player_name)
end
--- Adds X number (default 1) of warnings to a player from the given player
-- @tparam player LuaPlayer the player to add the warning to
-- @tparam[opt='<server>'] by_player_name string the name of the player doing the action
-- @tparam[opt=1] count number the number of warnings to add
-- @tparam LuaPlayer player the player to add the warning to
-- @tparam[opt='<server>'] string by_player_name the name of the player doing the action
-- @tparam[opt=1] number count the number of warnings to add
-- @treturn number the new number of warnings
function Public.add_warnings(player,by_player_name,count)
player = Game.get_player_from_any(player)
@@ -58,9 +58,9 @@ function Public.add_warnings(player,by_player_name,count)
end
--- Removes X number (default 1) of warnings from a player, removes in order fifo
-- @tparam player LuaPlayer the player to remove the warnings from
-- @tparam[opt='<server>'] by_playey_name string the name of the player doing the action
-- @tparam[opt=1] count number the number of warnings to remove (if greater than current warning count then all are removed)
-- @tparam LuaPlayer player the player to remove the warnings from
-- @tparam[opt='<server>'] string by_playey_name the name of the player doing the action
-- @tparam[opt=1] number count the number of warnings to remove (if greater than current warning count then all are removed)
-- @treturn number the new number of warnings
function Public.remove_warnings(player,by_player_name,count)
player = Game.get_player_from_any(player)
@@ -82,8 +82,8 @@ function Public.remove_warnings(player,by_player_name,count)
end
--- Clears all warnings from a player, emits event multiple times as if remove_warnings was used
-- @tparam player LuaPlayer the player to clear the warnings of
-- @tparam[oot='<server>'] by_player_name string the name of the player who is doing the action
-- @tparam LuaPlayer player the player to clear the warnings of
-- @tparam[oot='<server>'] string by_player_name the name of the player who is doing the action
-- @treturn boolean true if the warnings were cleared, nil if error
function Public.clear_warnings(player,by_player_name)
player = Game.get_player_from_any(player)
@@ -99,8 +99,8 @@ function Public.clear_warnings(player,by_player_name)
end
--- Gets the number of warnings that a player has, raw table will contain the names of who gave warnings
-- @tparam player LuaPlayer the player to get the warnings of
-- @tparam[opt=false] raw_table when true will return a table which contains who gave warnings (the table stored in global)
-- @tparam LuaPlayer player the player to get the warnings of
-- @tparam[opt=false] table table raw_table when true will return a which contains who gave warnings (the stored in global)
-- @treturn number the number of warnings a player has, a table if raw_table is true
function Public.get_warnings(player,raw_table)
player = Game.get_player_from_any(player)
@@ -114,8 +114,8 @@ function Public.get_warnings(player,raw_table)
end
--- Adds a temp warning to a player that will timeout after some time, used for script given warnings (ie silent to outside players as a buffer)
-- @tparam player LuaPlayer the player to give the warnings to
-- @tparam[opt=1] count number the number of warnings to give to the player
-- @tparam LuaPlayer player the player to give the warnings to
-- @tparam[opt=1] number count the number of warnings to give to the player
-- @treturn number the new number of warnings
function Public.add_temp_warnings(player,count)
player = Game.get_player_from_any(player)
@@ -153,8 +153,8 @@ Event.on_nth_tick(temp_warning_cool_down/4,function()
end)
--- Clears all temp warnings from a player, emits events as if the warnings had been removed due to time
-- @tparam player LuaPlayer the player to clear the warnings of
-- @tparam[opt='<server>'] by_player_name string the name of the player doing the action
-- @tparam LuaPlayer player the player to clear the warnings of
-- @tparam[opt='<server>'] string by_player_name the name of the player doing the action
-- @treturn boolean true if the warnings were cleared, nil for error
function Public.clear_temp_warnings(player,by_player_name)
player = Game.get_player_from_any(player)
@@ -170,8 +170,8 @@ function Public.clear_temp_warnings(player,by_player_name)
end
--- Gets the number of temp warnings, raw table is a table of when temp warnings were given
-- @tparam player LuaPlayer the player to get the warnings of
-- @tparam[opt=false] raw_table if true will return a table of ticks when warnings were added (the global table)
-- @tparam LuaPlayer player the player to get the warnings of
-- @tparam[opt=false] table raw_table if true will return a of ticks when warnings were added (the global table)
-- @treturn number the number of warnings which the player has, a table if raw_table is true
function Public.get_temp_warnings(player,raw_table)
player = Game.get_player_from_any(player)