Skip to content

Commit

Permalink
docs: Fix some doc comments (#1667)
Browse files Browse the repository at this point in the history
  • Loading branch information
Histalek authored Oct 16, 2024
1 parent 35450d5 commit 73b4723
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion gamemodes/terrortown/gamemode/client/cl_shop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions gamemodes/terrortown/gamemode/shared/sh_shop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lua/ttt2/extensions/draw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lua/ttt2/libraries/bodysearch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73b4723

Please sign in to comment.