From 73b4723052b4763d4506501106a8660cd5d36526 Mon Sep 17 00:00:00 2001 From: Histalek <16392835+Histalek@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:34:53 +0200 Subject: [PATCH] docs: Fix some doc comments (#1667) --- .../terrortown/gamemode/client/cl_shop.lua | 2 +- .../terrortown/gamemode/shared/sh_shop.lua | 20 +++++++++---------- lua/ttt2/extensions/draw.lua | 2 +- lua/ttt2/libraries/bodysearch.lua | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gamemodes/terrortown/gamemode/client/cl_shop.lua b/gamemodes/terrortown/gamemode/client/cl_shop.lua index cc5b56fd7b..1008159471 100644 --- a/gamemodes/terrortown/gamemode/client/cl_shop.lua +++ b/gamemodes/terrortown/gamemode/client/cl_shop.lua @@ -28,7 +28,7 @@ end --- -- Adds a @{WEAPON} or an @{ITEM} into the fav table -- @param string equipmentId the @{WEAPON} or @{ITEM} id --- @param bool isFavorite If the equipmentId is a favorite +-- @param boolean isFavorite If the equipmentId is a favorite -- @realm client function shop.SetFavoriteState(equipmentId, isFavorite) local favOrm = shop.favorites.orm diff --git a/gamemodes/terrortown/gamemode/shared/sh_shop.lua b/gamemodes/terrortown/gamemode/shared/sh_shop.lua index 4699290021..f9c22e43ae 100644 --- a/gamemodes/terrortown/gamemode/shared/sh_shop.lua +++ b/gamemodes/terrortown/gamemode/shared/sh_shop.lua @@ -67,7 +67,7 @@ end -- Returns if the equipment is already bought for the player -- @param Player ply The player to check -- @param string equipmentName The name of the equipment to check --- @return bool If the Equipment was bought +-- @return boolean If the Equipment was bought -- @realm shared function shop.IsBoughtFor(ply, equipmentName) return shop.buyTable[ply] and shop.buyTable[ply][equipmentName] @@ -76,7 +76,7 @@ end --- -- Returns if the equipment is already globally bought by a player -- @param string equipmentName The name of the equipment to check --- @return bool If the Equipment was globally bought +-- @return boolean If the Equipment was globally bought -- @realm shared function shop.IsGlobalBought(equipmentName) return shop.globalBuyTable[equipmentName] @@ -86,7 +86,7 @@ end -- Returns if the equipment is already bought for the players team -- @param Player ply The player to check the team of -- @param string equipmentName The name of the equipment to check --- @return bool If the Equipment was bought by a teammate +-- @return boolean If the Equipment was bought by a teammate -- @realm shared function shop.IsTeamBoughtFor(ply, equipmentName) local team = ply:GetTeam() @@ -150,7 +150,7 @@ end -- Check if an equipment is currently buyable for a player -- @param Player ply The player to buy the equipment for -- @param string equipmentName The name of the equipment to buy --- @return bool True, if equipment can be bought +-- @return boolean True, if equipment can be bought -- @return number The shop.statusCode, that lead to the decision -- @realm shared function shop.CanBuyEquipment(ply, equipmentName) @@ -274,7 +274,7 @@ end -- Buys for player the equipment with the corresponding Id -- @param Player ply The player to buy the equipment for -- @param string equipmentName The name of the equipment to buy --- @return bool True, if equipment can be bought +-- @return boolean True, if equipment can be bought -- @return number The shop.statusCode, that lead to the decision -- @realm shared function shop.BuyEquipment(ply, equipmentName) @@ -355,7 +355,7 @@ end --- -- Check if the player can reroll their shop -- @param Player ply The player to reroll the shop for --- @return bool True, if shop can be rerolled +-- @return boolean True, if shop can be rerolled -- @realm shared function shop.CanRerollShop(ply) return GetGlobalBool("ttt2_random_shops") @@ -369,7 +369,7 @@ end -- Reroll shop for player and subtract the credits of it -- @note Use `shop.ForceRerollShop(ply)` to reroll without cost and restrictions -- @param Player ply The player to reroll the shop for --- @return bool True, if shop was successfully rerolled +-- @return boolean True, if shop was successfully rerolled -- @realm shared function shop.TryRerollShop(ply) if not shop.CanRerollShop(ply) then @@ -398,9 +398,9 @@ end --- -- Transfer credits from one player to another --- @param Player The player to transfer the credits from --- @param string The SteamID64 of the player to transfer the credits to --- @param number The number of credits to transfer +-- @param Player ply The player to transfer the credits from +-- @param string targetPlyId64 The SteamID64 of the player to transfer the credits to +-- @param number credits The number of credits to transfer -- @realm shared function shop.TransferCredits(ply, targetPlyId64, credits) if not IsValid(ply) or not isstring(targetPlyId64) or not isnumber(credits) or credits <= 0 then diff --git a/lua/ttt2/extensions/draw.lua b/lua/ttt2/extensions/draw.lua index b1c704c7be..27b231c43a 100644 --- a/lua/ttt2/extensions/draw.lua +++ b/lua/ttt2/extensions/draw.lua @@ -806,7 +806,7 @@ end -- @param number radius The arc radius -- @param number thickness The arc thickness, the arc is drawn to the inside -- @param[default=0] number angleStart The arc start angle --- @param[default=0] number angleStart The arc end angle +-- @param[default=0] number angleEnd The arc end angle -- @param[default=1] number roughness The arc's roughness, aka degrees per step -- @param[default=COLOR_WHITE] number color The arc's color -- @realm client diff --git a/lua/ttt2/libraries/bodysearch.lua b/lua/ttt2/libraries/bodysearch.lua index 5d8fca6f01..e3fe699226 100644 --- a/lua/ttt2/libraries/bodysearch.lua +++ b/lua/ttt2/libraries/bodysearch.lua @@ -251,7 +251,7 @@ if SERVER then -- the player that is currently searching the body. -- @param Player inspector The player that searches the corpse -- @param Entity rag The ragdoll entity that is searched - -- @param[default=false] boolen isCovert Whether the body search is covert or announced + -- @param[default=false] boolean isCovert Whether the body search is covert or announced -- @param[default=false] boolean isLongRange Whether the search is long or short range -- @return table The scene data table -- @realm server