Skip to content

Commit

Permalink
feat: add verbose warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mafewtm committed May 25, 2024
1 parent 1b1ff6e commit ddb0be7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/groups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ exports('GetGangs', GetGangs)
---@param name string
---@return Job?
function GetJob(name)
lib.print.verbose('deprecated function GetJob invoked. use GetJobs instead')

return jobs[name]
end

Expand All @@ -42,6 +44,8 @@ exports('GetJob', GetJob)
---@param name string
---@return Gang?
function GetGang(name)
lib.print.verbose('deprecated function GetGang invoked. use GetGangs instead')

return gangs[name]
end

Expand Down
2 changes: 2 additions & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ exports('GetVehicles', GetVehicles)
---@deprecated use the GetVehicles function instead
---@return table<string, Vehicle>
function GetVehiclesByName()
lib.print.verbose('deprecated function GetVehiclesByName invoked. use GetVehicles instead')

return QBX.Shared.Vehicles
end

Expand Down
4 changes: 4 additions & 0 deletions server/groups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ exports('GetGangs', GetGangs)
---@param name string
---@return Job?
function GetJob(name)
lib.print.verbose('deprecated function GetJob invoked. use GetJobs instead')

return jobs[name]
end

Expand All @@ -144,6 +146,8 @@ exports('GetJob', GetJob)
---@param name string
---@return Gang?
function GetGang(name)
lib.print.verbose('deprecated function GetGang invoked. use GetGangs instead')

return gangs[name]
end

Expand Down
2 changes: 2 additions & 0 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ exports('GetVehicles', GetVehicles)
---@deprecated use the GetVehicles function instead
---@return table<string, Vehicle>
function GetVehiclesByName()
lib.print.verbose('deprecated function GetVehiclesByName invoked. use GetVehicles instead')

return QBX.Shared.Vehicles
end

Expand Down

0 comments on commit ddb0be7

Please sign in to comment.