diff --git a/modules/clothing/_default/server.lua b/modules/clothing/_default/server.lua index 7fa8c45..6c42e0f 100644 --- a/modules/clothing/_default/server.lua +++ b/modules/clothing/_default/server.lua @@ -22,9 +22,9 @@ Clothing.SetAppearance = function(src, data) end --- Sets a player's appearance based on gender-specific data ---- @param src number The server ID of the player ---- @param data table Table containing separate appearance data for male and female characters ---- @return table|nil Appearance updated player appearance data or nil if failed +---@param src number The server ID of the player +---@param data table Table containing separate appearance data for male and female characters +---@return table|nil Appearance updated player appearance data or nil if failed function Clothing.SetAppearanceExt(src, data) local tbl = Clothing.IsMale(src) and data.male or data.female Clothing.SetAppearance(src, tbl) diff --git a/modules/clothing/esx_skin/client.lua b/modules/clothing/esx_skin/client.lua index 14e9f85..3f1d870 100644 --- a/modules/clothing/esx_skin/client.lua +++ b/modules/clothing/esx_skin/client.lua @@ -1,4 +1,4 @@ - +---@diagnostic disable: duplicate-set-field if GetResourceState('esx_skin') == 'missing' then return end Clothing = Clothing or {} diff --git a/modules/clothing/esx_skin/server.lua b/modules/clothing/esx_skin/server.lua index b9f2f9c..5e2d8c4 100644 --- a/modules/clothing/esx_skin/server.lua +++ b/modules/clothing/esx_skin/server.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('esx_skin') == 'missing' then return end Clothing = Clothing or {} Clothing.Players = {} @@ -6,9 +7,9 @@ Callback = Callback or Require("lib/utility/shared/callbacks.lua") Table = Table or Require('lib/utility/shared/tables.lua') ESX = ESX or exports['es_extended']:getSharedObject() ---- Internal function to get the full appearance data including skin, model, and converted format ---- @param src number The server ID of the player ---- @return table|nil The player's full appearance data or nil if not found +---Internal function to get the full appearance data including skin, model, and converted format +---@param src number The server ID of the player +---@return table|nil The player's full appearance data or nil if not found function Clothing.GetFullAppearanceData(src) src = src and tonumber(src) assert(src, "src is nil") @@ -36,10 +37,10 @@ function Clothing.GetFullAppearanceData(src) return Clothing.Players[citId] end ---- Retrieves a player's converted appearance data for easy use across modules ---- @param src number The server ID of the player ---- @param fullData boolean Optional - If true, returns the full data object including skin and model ---- @return table|nil The player's converted appearance data or full appearance data if fullData=true +---Retrieves a player's converted appearance data for easy use across modules +---@param src number The server ID of the player +---@param fullData boolean Optional - If true, returns the full data object including skin and model +---@return table|nil The player's converted appearance data or full appearance data if fullData=true function Clothing.GetAppearance(src, fullData) if fullData then return Clothing.GetFullAppearanceData(src) @@ -49,7 +50,8 @@ function Clothing.GetAppearance(src, fullData) return completeData.converted end - +---This will save the player's current appearance to the database +---@param src number|string function Clothing.Save(src) src = src and tonumber(src) assert(src, "src is nil") @@ -66,11 +68,11 @@ function Clothing.Save(src) citId }) end ---- Sets a player's appearance based on the provided data ---- @param src number The server ID of the player ---- @param data table The appearance data to apply ---- @param updateBackup boolean Whether to update the backup appearance data ---- @return table|nil The updated player appearance data or nil if failed +---Sets a player's appearance based on the provided data +---@param src number The server ID of the player +---@param data table The appearance data to apply +---@param updateBackup boolean Whether to update the backup appearance data +---@return table|nil The updated player appearance data or nil if failed function Clothing.SetAppearance(src, data, updateBackup, save) src = src and tonumber(src) assert(src, "src is nil") @@ -113,17 +115,17 @@ function Clothing.SetAppearance(src, data, updateBackup, save) end --- Sets a player's appearance based on gender-specific data ---- @param src number The server ID of the player ---- @param data table Table containing separate appearance data for male and female characters ---- @return table|nil Appearance updated player appearance data or nil if failed +---@param src number The server ID of the player +---@param data table Table containing separate appearance data for male and female characters +---@return table|nil Appearance updated player appearance data or nil if failed function Clothing.SetAppearanceExt(src, data) local tbl = Clothing.IsMale(src) and data.male or data.female Clothing.SetAppearance(src, tbl) end ---- Reverts a player's appearance to their backup appearance ---- @param src number The server ID of the player ---- @return boolean|nil Returns true if successful or nil if failed +---Reverts a player's appearance to their backup appearance +---@param src number The server ID of the player +---@return boolean|nil Returns true if successful or nil if failed function Clothing.Revert(src) src = src and tonumber(src) assert(src, "src is nil") @@ -134,15 +136,16 @@ function Clothing.Revert(src) return Clothing.SetAppearance(src, backup) end - +---This will open the menu for the passed src +---@param src number|string function Clothing.OpenMenu(src) src = src and tonumber(src) assert(src, "src is nil") TriggerClientEvent('esx_skin:openMenu', src) end ---- Event handler for when a player loads into the server ---- Caches the player's appearance data +---Event handler for when a player loads into the server +---Caches the player's appearance data AddEventHandler('community_bridge:Server:OnPlayerLoaded', function(src) src = src and tonumber(src) assert(src, "src is nil") @@ -150,8 +153,8 @@ AddEventHandler('community_bridge:Server:OnPlayerLoaded', function(src) Clothing.GetFullAppearanceData(src) end) ---- Event handler for when a player disconnects from the server ---- Removes the player's appearance data from the cache +---Event handler for when a player disconnects from the server +---Removes the player's appearance data from the cache AddEventHandler('community_bridge:Server:OnPlayerUnload', function(src) src = src and tonumber(src) assert(src, "src is nil") @@ -161,8 +164,8 @@ end) ---- Event handler for when the resource starts ---- Caches appearance data for all currently connected players +---Event handler for when the resource starts +---Caches appearance data for all currently connected players AddEventHandler('onResourceStart', function(resource) if resource ~= GetCurrentResourceName() then return end for _, playerId in ipairs(GetPlayers()) do @@ -174,13 +177,12 @@ AddEventHandler('onResourceStart', function(resource) end end) ---- Callback handler for retrieving a player's appearance data +---Callback handler for retrieving a player's appearance data Callback.Register('community_bridge:cb:GetAppearance', function(source) local src = source return Clothing.GetAppearance(src) end) - RegisterCommand('clothing:debug', function(source, args, rawCommand) local src = source Clothing.SetAppearance(src, { diff --git a/modules/clothing/esx_skin/shared.lua b/modules/clothing/esx_skin/shared.lua index 1fbca5b..f8c3cea 100644 --- a/modules/clothing/esx_skin/shared.lua +++ b/modules/clothing/esx_skin/shared.lua @@ -1,4 +1,4 @@ - +---@diagnostic disable: duplicate-set-field if GetResourceState('esx_skin') == 'missing' then return end Clothing = Clothing or {} @@ -91,14 +91,14 @@ end function Props.ConvertFromDefault(defaultProps) local returnProps = {} - for index, propData in pairs(defaultProps or {}) do + for index, propData in pairs(defaultProps or {}) do local propId = Props.Map[propData.prop_id] if propId then returnProps[propId .. '_1'] = propData.drawable - returnProps[propId .. '_2'] = propData.texture + returnProps[propId .. '_2'] = propData.texture end end - return returnProps + return returnProps end function Props.ConvertToDefault(esxProps) @@ -115,14 +115,14 @@ function Props.ConvertToDefault(esxProps) returnProps[propId] = returnProps[propId] or {} returnProps[propId].prop_id = propId returnProps[propId].drawable = propData - returnProps[propId].texture = returnProps[propId].texture or 0 + returnProps[propId].texture = returnProps[propId].texture or 0 end end table.sort(returnProps, function(a, b) return a.prop_id < b.prop_id end) end - return returnProps + return returnProps end function Clothing.ConvertFromDefault(defaultClothing) @@ -131,7 +131,7 @@ function Clothing.ConvertFromDefault(defaultClothing) for propsIndex, propData in pairs(props) do components[propsIndex] = propData - end + end return components --skin end diff --git a/modules/clothing/fivem-appearance/client.lua b/modules/clothing/fivem-appearance/client.lua index 2f39567..dcf0bfe 100644 --- a/modules/clothing/fivem-appearance/client.lua +++ b/modules/clothing/fivem-appearance/client.lua @@ -1,4 +1,4 @@ - +---@diagnostic disable: duplicate-set-field if GetResourceState('fivem-appearance') == 'missing' then return end Clothing = Clothing or {} diff --git a/modules/clothing/fivem-appearance/server.lua b/modules/clothing/fivem-appearance/server.lua index 7f5d133..4235be8 100644 --- a/modules/clothing/fivem-appearance/server.lua +++ b/modules/clothing/fivem-appearance/server.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('fivem-appearance') == 'missing' then return end Clothing = Clothing or {} Clothing.Players = {} @@ -6,8 +7,8 @@ Callback = Callback or Require("lib/utility/shared/callbacks.lua") Table = Table or Require('lib/utility/shared/tables.lua') --- Internal function to get the full appearance data including skin, model, and converted format ---- @param src number The server ID of the player ---- @return table|nil The player's full appearance data or nil if not found +---@param src number The server ID of the player +---@return table|nil The player's full appearance data or nil if not found function Clothing.GetFullAppearanceData(src) src = src and tonumber(src) assert(src, "src is nil") @@ -34,9 +35,9 @@ function Clothing.GetFullAppearanceData(src) end --- Retrieves a player's converted appearance data for easy use across modules ---- @param src number The server ID of the player ---- @param fullData boolean Optional - If true, returns the full data object including skin and model ---- @return table|nil The player's converted appearance data or full appearance data if fullData=true +---@param src number The server ID of the player +---@param fullData boolean Optional - If true, returns the full data object including skin and model +---@return table|nil The player's converted appearance data or full appearance data if fullData=true function Clothing.GetAppearance(src, fullData) if fullData then return Clothing.GetFullAppearanceData(src) @@ -47,10 +48,10 @@ function Clothing.GetAppearance(src, fullData) end --- Sets a player's appearance based on the provided data ---- @param src number The server ID of the player ---- @param data table The appearance data to apply ---- @param updateBackup boolean Whether to update the backup appearance data ---- @return table|nil The updated player appearance data or nil if failed +---@param src number The server ID of the player +---@param data table The appearance data to apply +---@param updateBackup boolean Whether to update the backup appearance data +---@return table|nil The updated player appearance data or nil if failed function Clothing.SetAppearance(src, data, updateBackup, save) src = src and tonumber(src) assert(src, "src is nil") @@ -89,17 +90,17 @@ function Clothing.SetAppearance(src, data, updateBackup, save) end --- Sets a player's appearance based on gender-specific data ---- @param src number The server ID of the player ---- @param data table Table containing separate appearance data for male and female characters ---- @return table|nil Appearance updated player appearance data or nil if failed +---@param src number The server ID of the player +---@param data table Table containing separate appearance data for male and female characters +---@return table|nil Appearance updated player appearance data or nil if failed function Clothing.SetAppearanceExt(src, data) local tbl = Clothing.IsMale(src) and data.male or data.female Clothing.SetAppearance(src, tbl) end --- Reverts a player's appearance to their backup appearance ---- @param src number The server ID of the player ---- @return boolean|nil Returns true if successful or nil if failed +---@param src number The server ID of the player +---@return boolean|nil Returns true if successful or nil if failed function Clothing.Revert(src) src = src and tonumber(src) local currentClothing = Clothing.GetFullAppearanceData(src) diff --git a/modules/clothing/illenium-appearance/client.lua b/modules/clothing/illenium-appearance/client.lua index a7ff332..d001e7e 100644 --- a/modules/clothing/illenium-appearance/client.lua +++ b/modules/clothing/illenium-appearance/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('illenium-appearance') == 'missing' then return end Clothing = Clothing or {} diff --git a/modules/clothing/illenium-appearance/server.lua b/modules/clothing/illenium-appearance/server.lua index 6f99696..b78c1b2 100644 --- a/modules/clothing/illenium-appearance/server.lua +++ b/modules/clothing/illenium-appearance/server.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('illenium-appearance') == 'missing' then return end Clothing = Clothing or {} Clothing.Players = {} @@ -6,8 +7,8 @@ Callback = Callback or Require("lib/utility/shared/callbacks.lua") Table = Table or Require('lib/utility/shared/tables.lua') --- Internal function to get the full appearance data including skin, model, and converted format ---- @param src number The server ID of the player ---- @return table|nil The player's full appearance data or nil if not found +---@param src number The server ID of the player +---@return table|nil The player's full appearance data or nil if not found function Clothing.GetFullAppearanceData(src) src = src and tonumber(src) assert(src, "src is nil") @@ -34,9 +35,9 @@ function Clothing.GetFullAppearanceData(src) end --- Retrieves a player's converted appearance data for easy use across modules ---- @param src number The server ID of the player ---- @param fullData boolean Optional - If true, returns the full data object including skin and model ---- @return table|nil The player's converted appearance data or full appearance data if fullData=true +---@param src number The server ID of the player +---@param fullData boolean Optional - If true, returns the full data object including skin and model +---@return table|nil The player's converted appearance data or full appearance data if fullData=true function Clothing.GetAppearance(src, fullData) if fullData then return Clothing.GetFullAppearanceData(src) @@ -47,10 +48,10 @@ function Clothing.GetAppearance(src, fullData) end --- Sets a player's appearance based on the provided data ---- @param src number The server ID of the player ---- @param data table The appearance data to apply ---- @param updateBackup boolean Whether to update the backup appearance data ---- @return table|nil The updated player appearance data or nil if failed +---@param src number The server ID of the player +---@param data table The appearance data to apply +---@param updateBackup boolean Whether to update the backup appearance data +---@return table|nil The updated player appearance data or nil if failed function Clothing.SetAppearance(src, data, updateBackup, save) src = src and tonumber(src) assert(src, "src is nil") @@ -89,17 +90,17 @@ function Clothing.SetAppearance(src, data, updateBackup, save) end --- Sets a player's appearance based on gender-specific data ---- @param src number The server ID of the player ---- @param data table Table containing separate appearance data for male and female characters ---- @return table|nil Appearance updated player appearance data or nil if failed +---@param src number The server ID of the player +---@param data table Table containing separate appearance data for male and female characters +---@return table|nil Appearance updated player appearance data or nil if failed function Clothing.SetAppearanceExt(src, data) local tbl = Clothing.IsMale(src) and data.male or data.female Clothing.SetAppearance(src, tbl) end --- Reverts a player's appearance to their backup appearance ---- @param src number The server ID of the player ---- @return boolean|nil Returns true if successful or nil if failed +---@param src number The server ID of the player +---@return boolean|nil Returns true if successful or nil if failed function Clothing.Revert(src) src = src and tonumber(src) assert(src, "src is nil") diff --git a/modules/clothing/qb-clothing/client.lua b/modules/clothing/qb-clothing/client.lua index 9b87845..45e0d71 100644 --- a/modules/clothing/qb-clothing/client.lua +++ b/modules/clothing/qb-clothing/client.lua @@ -1,8 +1,7 @@ - +---@diagnostic disable: duplicate-set-field if GetResourceState('qb-clothing') == 'missing' then return end Clothing = Clothing or {} function Clothing.OpenMenu() TriggerEvent('qb-clothing:client:openMenu') -end - +end \ No newline at end of file diff --git a/modules/clothing/qb-clothing/server.lua b/modules/clothing/qb-clothing/server.lua index afea8a7..046f84a 100644 --- a/modules/clothing/qb-clothing/server.lua +++ b/modules/clothing/qb-clothing/server.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('qb-clothing') == 'missing' then return end Clothing = Clothing or {} Clothing.Players = {} @@ -7,8 +8,8 @@ Table = Table or Require('lib/utility/shared/tables.lua') QBCore = QBCore or exports['qb-core']:GetCoreObject() -- probably easiest for now to call the Framework module --- Internal function to get the full appearance data including skin, model, and converted format ---- @param src number The server ID of the player ---- @return table|nil The player's full appearance data or nil if not found +---@param src number The server ID of the player +---@return table|nil The player's full appearance data or nil if not found function Clothing.GetFullAppearanceData(src) src = src and tonumber(src) assert(src, "src is nil") @@ -37,9 +38,9 @@ function Clothing.GetFullAppearanceData(src) end --- Retrieves a player's converted appearance data for easy use across modules ---- @param src number The server ID of the player ---- @param fullData boolean Optional - If true, returns the full data object including skin and model ---- @return table|nil The player's converted appearance data or full appearance data if fullData=true +---@param src number The server ID of the player +---@param fullData boolean Optional - If true, returns the full data object including skin and model +---@return table|nil The player's converted appearance data or full appearance data if fullData=true function Clothing.GetAppearance(src, fullData) if fullData then return Clothing.GetFullAppearanceData(src) @@ -50,10 +51,10 @@ function Clothing.GetAppearance(src, fullData) end --- Sets a player's appearance based on the provided data ---- @param src number The server ID of the player ---- @param data table The appearance data to apply ---- @param updateBackup boolean Whether to update the backup appearance data ---- @return table|nil The updated player appearance data or nil if failed +---@param src number The server ID of the player +---@param data table The appearance data to apply +---@param updateBackup boolean Whether to update the backup appearance data +---@return table|nil The updated player appearance data or nil if failed function Clothing.SetAppearance(src, data, updateBackup, save) src = src and tonumber(src) assert(src, "src is nil") @@ -94,17 +95,17 @@ function Clothing.SetAppearance(src, data, updateBackup, save) end --- Sets a player's appearance based on gender-specific data ---- @param src number The server ID of the player ---- @param data table Table containing separate appearance data for male and female characters ---- @return table|nil Appearance updated player appearance data or nil if failed +---@param src number The server ID of the player +---@param data table Table containing separate appearance data for male and female characters +---@return table|nil Appearance updated player appearance data or nil if failed function Clothing.SetAppearanceExt(src, data) local tbl = Clothing.IsMale(src) and data.male or data.female Clothing.SetAppearance(src, tbl) end --- Reverts a player's appearance to their backup appearance ---- @param src number The server ID of the player ---- @return boolean|nil Returns true if successful or nil if failed +---@param src number The server ID of the player +---@return boolean|nil Returns true if successful or nil if failed function Clothing.Revert(src) src = src and tonumber(src) assert(src, "src is nil") @@ -145,8 +146,6 @@ AddEventHandler('community_bridge:Server:OnPlayerUnload', function(src) Clothing.Players[strSrc] = nil end) - - --- Event handler for when the resource starts --- Caches appearance data for all currently connected players AddEventHandler('onResourceStart', function(resource) @@ -166,7 +165,7 @@ Callback.Register('community_bridge:cb:GetAppearance', function(source) return Clothing.GetAppearance(src) end) - +--[[ RegisterCommand('clothing:debug', function(source, args, rawCommand) local src = source Clothing.SetAppearance(src, { @@ -206,7 +205,7 @@ RegisterCommand('clothing:openmenu', function(source, args, rawCommand) local src = source Clothing.OpenMenu(src) end, false) - +--]] -- RegisterCommand('clothing:crowley', function(source, args, rawCommand) -- local src = source @@ -236,4 +235,4 @@ end, false) -- -- {drawable = 0, prop_id = 7, texture = 0}, -- } -- }, false, true) --- end, false) +-- end, false) \ No newline at end of file diff --git a/modules/clothing/qb-clothing/shared.lua b/modules/clothing/qb-clothing/shared.lua index fcff4ae..7a24b98 100644 --- a/modules/clothing/qb-clothing/shared.lua +++ b/modules/clothing/qb-clothing/shared.lua @@ -92,7 +92,7 @@ end function Props.ConvertToDefault(qbProps) local returnProps = {} - for propIndex, propData in pairs(qbProps or {}) do + for propIndex, propData in pairs(qbProps or {}) do local propId = Props.InverseMap[propIndex] if propId then table.insert(returnProps, { @@ -114,7 +114,7 @@ function Clothing.ConvertFromDefault(defaultClothing) for propsIndex, propData in pairs(props) do components[propsIndex] = propData - end + end return components --skin end diff --git a/modules/dialogue/_default/client/client.lua b/modules/dialogue/_default/client/client.lua index b3fc2a5..4792b0e 100644 --- a/modules/dialogue/_default/client/client.lua +++ b/modules/dialogue/_default/client/client.lua @@ -36,9 +36,9 @@ function Dialogue.Close(name) end --- Open a dialogue with the player ---- @param name string ---- @param dialogue string ---- @param options table example = {{ id = string, label = string}} +---@param name string +---@param dialogue string +---@param options table example = {{ id = string, label = string}} function Dialogue.Open( name, dialogue, characterOptions, dialogueOptions, onSelected) assert(name, "Name is required") assert(dialogue, "Dialogue is required") diff --git a/modules/dispatch/_default/client/client.lua b/modules/dispatch/_default/client/client.lua index 16f4c99..ab2434e 100644 --- a/modules/dispatch/_default/client/client.lua +++ b/modules/dispatch/_default/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field Dispatch = Dispatch or {} ---This will send an alert to currently supported dispatch systems. diff --git a/modules/dispatch/bub-mdt/client/client.lua b/modules/dispatch/bub-mdt/client/client.lua index f65a4fa..a17f3f5 100644 --- a/modules/dispatch/bub-mdt/client/client.lua +++ b/modules/dispatch/bub-mdt/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('bub-mdt') == 'missing' then return end Dispatch = Dispatch or {} diff --git a/modules/dispatch/cd_dispatch/client/client.lua b/modules/dispatch/cd_dispatch/client/client.lua index 126e33a..799b1fe 100644 --- a/modules/dispatch/cd_dispatch/client/client.lua +++ b/modules/dispatch/cd_dispatch/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('cd_dispatch') == 'missing' then return end Dispatch = Dispatch or {} diff --git a/modules/dispatch/lb-tablet/client/client.lua b/modules/dispatch/lb-tablet/client/client.lua index d02e16f..c8aa413 100644 --- a/modules/dispatch/lb-tablet/client/client.lua +++ b/modules/dispatch/lb-tablet/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('lb-tablet') == 'missing' then return end Dispatch = Dispatch or {} @@ -13,7 +14,7 @@ local function getPriorityLevel(priority) end end ----commentThis will send an alert to the passed jobs +---This will send an alert to the passed jobs ---@param data table Dispatch.SendAlert = function(data) local streetName, _ = Utility.GetStreetNameAtCoords(data.coords) diff --git a/modules/dispatch/linden_outlawalert/client/client.lua b/modules/dispatch/linden_outlawalert/client/client.lua index 8df6341..4b63501 100644 --- a/modules/dispatch/linden_outlawalert/client/client.lua +++ b/modules/dispatch/linden_outlawalert/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('linden_outlawalert') == 'missing' then return end Dispatch = Dispatch or {} diff --git a/modules/dispatch/ps-dispatch/client/client.lua b/modules/dispatch/ps-dispatch/client/client.lua index 2aa3bb8..835fcea 100644 --- a/modules/dispatch/ps-dispatch/client/client.lua +++ b/modules/dispatch/ps-dispatch/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('ps-dispatch') == 'missing' then return end if GetResourceState('lb-tablet') == 'started' then return end Dispatch = Dispatch or {} diff --git a/modules/dispatch/qs_dispatch/client/client.lua b/modules/dispatch/qs_dispatch/client/client.lua index 27ffc90..3762ddc 100644 --- a/modules/dispatch/qs_dispatch/client/client.lua +++ b/modules/dispatch/qs_dispatch/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('qs-dispatch') == 'missing' then return end Dispatch = Dispatch or {} diff --git a/modules/dispatch/redutzu-mdt/client/client.lua b/modules/dispatch/redutzu-mdt/client/client.lua index 261475a..8b0ef79 100644 --- a/modules/dispatch/redutzu-mdt/client/client.lua +++ b/modules/dispatch/redutzu-mdt/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('redutzu-mdt') == 'missing' then return end Dispatch = Dispatch or {} diff --git a/modules/dispatch/tk_dispatch/client/client.lua b/modules/dispatch/tk_dispatch/client/client.lua index 0889533..61de466 100644 --- a/modules/dispatch/tk_dispatch/client/client.lua +++ b/modules/dispatch/tk_dispatch/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('tk_dispatch') == 'missing' then return end Dispatch = Dispatch or {} diff --git a/modules/doorlock/_default/client.lua b/modules/doorlock/_default/client.lua index b6d98fe..9743a7d 100644 --- a/modules/doorlock/_default/client.lua +++ b/modules/doorlock/_default/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field Doorlock = Doorlock or {} ---This will get the closest door to the ped diff --git a/modules/fuel/_default/client.lua b/modules/fuel/_default/client.lua index 731ace5..0e4e9c1 100644 --- a/modules/fuel/_default/client.lua +++ b/modules/fuel/_default/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field Fuel = Fuel or {} diff --git a/modules/fuel/bigDaddy-Fuel/client.lua b/modules/fuel/bigDaddy-Fuel/client.lua index a569f87..941f529 100644 --- a/modules/fuel/bigDaddy-Fuel/client.lua +++ b/modules/fuel/bigDaddy-Fuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "BigDaddy-Fuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/cdn-fuel/client.lua b/modules/fuel/cdn-fuel/client.lua index 05ed82b..c94ead0 100644 --- a/modules/fuel/cdn-fuel/client.lua +++ b/modules/fuel/cdn-fuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "cdn-fuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/esx-sna-fuel/client.lua b/modules/fuel/esx-sna-fuel/client.lua index 80d2203..8205284 100644 --- a/modules/fuel/esx-sna-fuel/client.lua +++ b/modules/fuel/esx-sna-fuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "esx-sna-fuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/legacyfuel/client.lua b/modules/fuel/legacyfuel/client.lua index 04694f1..fc95740 100644 --- a/modules/fuel/legacyfuel/client.lua +++ b/modules/fuel/legacyfuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "LegacyFuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/okokGasStation/client.lua b/modules/fuel/okokGasStation/client.lua index f4c93a2..0069a12 100644 --- a/modules/fuel/okokGasStation/client.lua +++ b/modules/fuel/okokGasStation/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "okokGasStation" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/ox_fuel/client.lua b/modules/fuel/ox_fuel/client.lua index 964b201..9856645 100644 --- a/modules/fuel/ox_fuel/client.lua +++ b/modules/fuel/ox_fuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "ox_fuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/ps-fuel/client.lua b/modules/fuel/ps-fuel/client.lua index d19bd2f..f083538 100644 --- a/modules/fuel/ps-fuel/client.lua +++ b/modules/fuel/ps-fuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "ps-fuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/qs-fuelstations/client.lua b/modules/fuel/qs-fuelstations/client.lua index ea6827a..ec4a91e 100644 --- a/modules/fuel/qs-fuelstations/client.lua +++ b/modules/fuel/qs-fuelstations/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "qs-fuelstations" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/renewed-Fuel/client.lua b/modules/fuel/renewed-Fuel/client.lua index 39ff817..0408a99 100644 --- a/modules/fuel/renewed-Fuel/client.lua +++ b/modules/fuel/renewed-Fuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "Renewed-Fuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/ti_fuel/client.lua b/modules/fuel/ti_fuel/client.lua index 41f4553..7c9e77d 100644 --- a/modules/fuel/ti_fuel/client.lua +++ b/modules/fuel/ti_fuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "ti_fuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/fuel/x-fuel/client.lua b/modules/fuel/x-fuel/client.lua index ce2bdf6..fc2d054 100644 --- a/modules/fuel/x-fuel/client.lua +++ b/modules/fuel/x-fuel/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "x-fuel" if GetResourceState(resourceName) == 'missing' then return end Fuel = Fuel or {} diff --git a/modules/helptext/_default/client.lua b/modules/helptext/_default/client.lua index 13bd0c1..8494c66 100644 --- a/modules/helptext/_default/client.lua +++ b/modules/helptext/_default/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field HelpText = HelpText or {} ---This will show a help text message at the screen position passed diff --git a/modules/helptext/_default/server.lua b/modules/helptext/_default/server.lua index 48115a8..fe80525 100644 --- a/modules/helptext/_default/server.lua +++ b/modules/helptext/_default/server.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field HelpText = HelpText or {} ---This will show a help text message to the specified player at the screen position passed diff --git a/modules/helptext/cd_drawtextui/client.lua b/modules/helptext/cd_drawtextui/client.lua index 9d55f2e..d257822 100644 --- a/modules/helptext/cd_drawtextui/client.lua +++ b/modules/helptext/cd_drawtextui/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field HelpText = HelpText or {} local resourceName = "cd_drawtextui" local configValue = BridgeSharedConfig.HelpText @@ -8,14 +9,12 @@ if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (c ---@param message string ---@param _position string ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.ShowHelpText = function(message, _position) return TriggerEvent('cd_drawtextui:ShowUI', 'show', message) end ---This will hide the help text message on the screen ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.HideHelpText = function() return TriggerEvent('cd_drawtextui:HideUI') end diff --git a/modules/helptext/jg-textui/client.lua b/modules/helptext/jg-textui/client.lua index cc6d4f8..bceec6d 100644 --- a/modules/helptext/jg-textui/client.lua +++ b/modules/helptext/jg-textui/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field HelpText = HelpText or {} local resourceName = "jg-textui" local configValue = BridgeSharedConfig.HelpText @@ -7,14 +8,12 @@ if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (c ---@param message string ---@param _position string ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.ShowHelpText = function(message, _position) return exports['jg-textui']:DrawText(message) end ---This will hide the help text message on the screen ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.HideHelpText = function() return exports['jg-textui']:HideText() end diff --git a/modules/helptext/lab-HintUI/client.lua b/modules/helptext/lab-HintUI/client.lua index 0ddccb9..f72fdd9 100644 --- a/modules/helptext/lab-HintUI/client.lua +++ b/modules/helptext/lab-HintUI/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field HelpText = HelpText or {} local resourceName = "lab-HintUI" local configValue = BridgeSharedConfig.HelpText @@ -7,14 +8,12 @@ if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (c ---@param message string ---@param _position string ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.ShowHelpText = function(message, _position) return exports['lab-HintUI']:Show(message, "Hint Text") end ---This will hide the help text message on the screen ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.HideHelpText = function() return exports['lab-HintUI']:Hide() end diff --git a/modules/helptext/okokTextUI/client.lua b/modules/helptext/okokTextUI/client.lua index fec30be..7ad8a0e 100644 --- a/modules/helptext/okokTextUI/client.lua +++ b/modules/helptext/okokTextUI/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field HelpText = HelpText or {} local resourceName = "okokTextUI" local configValue = BridgeSharedConfig.HelpText @@ -7,14 +8,12 @@ if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (c ---@param message string ---@param _position string ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.ShowHelpText = function(message, _position) return exports['okokTextUI']:Open(message, 'darkblue', _position, false) end ---This will hide the help text message on the screen ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.HideHelpText = function() return exports['okokTextUI']:Close() end diff --git a/modules/helptext/ox_lib/client.lua b/modules/helptext/ox_lib/client.lua index aaa96d6..e36abff 100644 --- a/modules/helptext/ox_lib/client.lua +++ b/modules/helptext/ox_lib/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field HelpText = HelpText or {} local resourceName = "ox_lib" local configValue = BridgeSharedConfig.HelpText @@ -7,7 +8,6 @@ if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (c ---@param message string ---@param position string ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.ShowHelpText = function(message, position) return exports.ox_lib:showTextUI(message, { position = position or 'top-center' @@ -16,7 +16,6 @@ end ---This will hide the help text message on the screen ---@return nil ----@diagnostic disable-next-line: duplicate-set-field HelpText.HideHelpText = function() return exports.ox_lib:hideTextUI() end diff --git a/modules/input/_qb-input/client.lua b/modules/input/_qb-input/client.lua index 4efefa9..946c018 100644 --- a/modules/input/_qb-input/client.lua +++ b/modules/input/_qb-input/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "qb-input" local configValue = BridgeClientConfig.InputSystem if (configValue == "auto" and GetResourceState(resourceName) == "missing") or (configValue ~= "auto" and configValue ~= resourceName) then return end diff --git a/modules/input/ox_lib/client.lua b/modules/input/ox_lib/client.lua index bc6e05d..fa379ff 100644 --- a/modules/input/ox_lib/client.lua +++ b/modules/input/ox_lib/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "ox_lib" local configValue = BridgeClientConfig.InputSystem if (configValue == "auto" and GetResourceState(resourceName) == "missing") or (configValue ~= "auto" and configValue ~= resourceName) then return end diff --git a/modules/inventory/_default/server.lua b/modules/inventory/_default/server.lua index 7394471..41b0a25 100644 --- a/modules/inventory/_default/server.lua +++ b/modules/inventory/_default/server.lua @@ -34,12 +34,16 @@ Inventory.AddTrunkItems = function(identifier, items) return false, Prints.Error("This Inventory Has Not Been Bridged For A Trunk Feature.") end +---This will clear the specified inventory, will return success or failure. +---@param id string +---@return boolean Inventory.ClearStash = function(id, _type) if type(id) ~= "string" then return false end return false, Prints.Error("This Inventory Has Not Been Bridged For A ClearStash Feature.") end ----This will return a table with the item info, {name, label, stack, weight, description, image} +---This will return a table with the item info, +---example: {name = "coolitem", label = "a cool item name", stack = false, weight = 1000, description = "some item description", image = "coolitem.png"} ---@param item string ---@return table Inventory.GetItemInfo = function(item) @@ -47,8 +51,8 @@ Inventory.GetItemInfo = function(item) end ---This will return the count of the item in the players inventory, if not found will return 0. ---- ---if metadata is passed it will find the matching items count. +---example: 0 ---@param src number ---@param item string ---@param metadata table @@ -58,6 +62,7 @@ Inventory.GetItemCount = function(src, item, metadata) end ---This wil return the players inventory. +---example: {{weight = 10, name = "farts", metadata = {description = "this is a description"}, slot = 1, label = "stinky", count = 1}, {weight = 10, name = "farts", metadata = {description = "this is a description"}, slot = 2, label = "stinky", count = 1}} ---@param src number ---@return table Inventory.GetPlayerInventory = function(src) @@ -65,8 +70,7 @@ Inventory.GetPlayerInventory = function(src) end ---Returns the specified slot data as a table. ---- ----format {weight, name, metadata, slot, label, count} +---example {weight = 10, name = "farts", metadata = {description = "this is a description"}, slot = 1, label = "stinky", count = 1} ---@param src number ---@param slot number ---@return table @@ -152,10 +156,10 @@ Inventory.OpenShop = function(src, shopTitle) end -- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups) return false, Prints.Error("This Inventory Has Not Been Bridged For A CreateShop Feature.") end @@ -167,6 +171,10 @@ Inventory.GetImagePath = function(item) return "https://avatars.githubusercontent.com/u/47620135" end +---This will remove the file extension from the item name if present. +---example: "item.png" will become "item" +---@param item string +---@return string Inventory.StripPNG = function(item) if string.find(item, ".png") then item = string.gsub(item, ".png", "") diff --git a/modules/inventory/codem-inventory/server.lua b/modules/inventory/codem-inventory/server.lua index a41417e..e4c40d9 100644 --- a/modules/inventory/codem-inventory/server.lua +++ b/modules/inventory/codem-inventory/server.lua @@ -193,10 +193,10 @@ Inventory.OpenShop = function(src, shopTitle) end -- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups) return true, print("Unable to Create Shop for codem-inventory, I do not have access to a copy of this inventory to bridge the feature.") end diff --git a/modules/inventory/core_inventory/server.lua b/modules/inventory/core_inventory/server.lua index 25d7201..5fba66f 100644 --- a/modules/inventory/core_inventory/server.lua +++ b/modules/inventory/core_inventory/server.lua @@ -52,7 +52,6 @@ Inventory.RemoveItem = function(src, item, count, slot, metadata) end ---This will return the count of the item in the players inventory, if not found will return 0. ---- ---if metadata is passed it will find the matching items count. ---@param src number ---@param item string @@ -110,7 +109,6 @@ Inventory.GetPlayerInventory = function(src) end ---Returns the specified slot data as a table. ---- ---format {weight, name, metadata, slot, label, count} ---@param src number ---@param slot number @@ -175,7 +173,6 @@ Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coor groups = groups, coords = coords } - --core:openInventory(nil, id, 'stash', mathyShit, mathyShit, false, nil, false) return true, id end @@ -246,25 +243,24 @@ Inventory.GetImagePath = function(item) return imagePath or "https://avatars.githubusercontent.com/u/47620135" end --- This will open the specified shop for the src passed. +---This will open the specified shop for the src passed. ---@param src number ---@param shopTitle string Inventory.OpenShop = function(src, shopTitle) return false, print("Unable to open shop for core_inventory, I do not have access to a copy of this inventory to bridge the feature.") end --- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---This will register a shop, if it already exists it will return true. +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups) return false, print("Unable to open shop for core_inventory, I do not have access to a copy of this inventory to bridge the feature.") end - ---<-- TODO swap to internal callback system --- This is used for the esx users, documentation doesnt show a client side available option for the inventory so we use jank callbacks to get this. +---<-- TODO swap to internal callback system +---This is used for the esx users, documentation doesnt show a client side available option for the inventory so we use jank callbacks to get this. lib.callback.register('community_bridge:Callback:core_inventory', function(source) local items = core:getItemsList() return items or {} diff --git a/modules/inventory/jpr-inventory/server.lua b/modules/inventory/jpr-inventory/server.lua index 3aad1d1..45eede7 100644 --- a/modules/inventory/jpr-inventory/server.lua +++ b/modules/inventory/jpr-inventory/server.lua @@ -41,7 +41,6 @@ Inventory.GetItemInfo = function(item) end ---Returns the specified slot data as a table. ---- ---format {weight, name, metadata, slot, label, count} ---@param src number ---@param slot number @@ -156,18 +155,18 @@ Inventory.GetImagePath = function(item) return imagePath or "https://avatars.githubusercontent.com/u/47620135" end --- This will open the specified shop for the src passed. +---This will open the specified shop for the src passed. ---@param src number ---@param shopTitle string Inventory.OpenShop = function(src, shopTitle) jpr:OpenShop(src, shopTitle) end --- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---This will register a shop, if it already exists it will return true. +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups) if not shopTitle or not shopInventory or not shopCoords then return end if registeredShops[shopTitle] then return true end diff --git a/modules/inventory/origen_inventory/server.lua b/modules/inventory/origen_inventory/server.lua index b4bf7a6..c5ccd35 100644 --- a/modules/inventory/origen_inventory/server.lua +++ b/modules/inventory/origen_inventory/server.lua @@ -227,10 +227,10 @@ Inventory.OpenShop = function(src, shopTitle) end -- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups) return true, print("Currently runtime shops are not supported in origen_inventory") end diff --git a/modules/inventory/ox_inventory/server.lua b/modules/inventory/ox_inventory/server.lua index ac0c964..234aaef 100644 --- a/modules/inventory/ox_inventory/server.lua +++ b/modules/inventory/ox_inventory/server.lua @@ -190,10 +190,10 @@ Inventory.OpenShop = function(src, shopTitle) end -- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups) if registeredShops[shopTitle] then return true end registeredShops[shopTitle] = true diff --git a/modules/inventory/ps-inventory/server.lua b/modules/inventory/ps-inventory/server.lua index 09ff6f2..38c5ae3 100644 --- a/modules/inventory/ps-inventory/server.lua +++ b/modules/inventory/ps-inventory/server.lua @@ -185,10 +185,10 @@ Inventory.OpenShop = function(src, shopTitle) end -- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(src, shopTitle, shopInventory, shopCoords, shopGroups) if not shopTitle or not shopInventory or not shopCoords then return end if registeredShops[shopTitle] then return true end diff --git a/modules/inventory/qs-inventory/server.lua b/modules/inventory/qs-inventory/server.lua index 3b40ab6..2fded30 100644 --- a/modules/inventory/qs-inventory/server.lua +++ b/modules/inventory/qs-inventory/server.lua @@ -223,10 +223,10 @@ Inventory.OpenShop = function(src, shopTitle) end -- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups) return false, print("Currently qs shop is not bridged") end diff --git a/modules/inventory/tgiann-inventory/server.lua b/modules/inventory/tgiann-inventory/server.lua index 77773d5..8dcbc62 100644 --- a/modules/inventory/tgiann-inventory/server.lua +++ b/modules/inventory/tgiann-inventory/server.lua @@ -213,10 +213,10 @@ Inventory.OpenShop = function(src, shopTitle) end -- This will register a shop, if it already exists it will return true. --- @param shopTitle string --- @param shopInventory table --- @param shopCoords table --- @param shopGroups table +---@param shopTitle string +---@param shopInventory table +---@param shopCoords table +---@param shopGroups table Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups) return false, print("Currently tgiann-inventory is not bridged for shops") end diff --git a/modules/menu/_oxlib.lua b/modules/menu/_oxlib.lua index c1e78cf..02603fe 100644 --- a/modules/menu/_oxlib.lua +++ b/modules/menu/_oxlib.lua @@ -2,7 +2,8 @@ local resourceName = "ox_lib" local configValue = BridgeClientConfig.MenuSystem if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end Menus = Menus or {} ---- Converts a QB menu to an Ox menu. + +---Converts a QB menu to an Ox menu. ---@param id string The menu ID. ---@param menu table The QB menu data. ---@return table The Ox menu data. @@ -50,4 +51,4 @@ OpenMenu = function(id, data, useQBinput) lib.registerContext(data) lib.showContext(id) return data -end +end \ No newline at end of file diff --git a/modules/menu/_qb-menu.lua b/modules/menu/_qb-menu.lua index 411fd0e..98285bb 100644 --- a/modules/menu/_qb-menu.lua +++ b/modules/menu/_qb-menu.lua @@ -1,8 +1,8 @@ local resourceName = "qb-menu" local configValue = BridgeClientConfig.MenuSystem if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ---print("Loading QB Menu") ---- Converts an Ox menu to a QB menu. + +---Converts an Ox menu to a QB menu. ---@param id string The menu ID. ---@param menu table The Ox menu data. ---@return table The QB menu data. diff --git a/modules/menu/client.lua b/modules/menu/client.lua index 26b2713..c5a497f 100644 --- a/modules/menu/client.lua +++ b/modules/menu/client.lua @@ -1,7 +1,7 @@ Menus = Menus or {} Menu = {} ---- Opens a menu based on the configuration. +---Opens a menu based on the configuration. ---@param data table The menu data. ---@param useQb boolean Whether to use QB menu syntax. ---@return id string The menu ID. @@ -12,9 +12,9 @@ function Menu.Open(data, useQb) return id end ---- Event to handle callback from menu selection. ---- @param _args table The arguments passed to the callback. ---- @return nil +---Event to handle callback from menu selection. +---@param _args table The arguments passed to the callback. +---@return nil RegisterNetEvent('community_bridge:client:MenuCallback', function(_args) local id = _args.id local onSelect = _args.onSelect @@ -23,91 +23,4 @@ RegisterNetEvent('community_bridge:client:MenuCallback', function(_args) onSelect(args) end) -return Menu - ---[[ - ---Unit Tests -local qbMenu = { - { - header = 'QBCore Test Menu', - icon = 'fas fa-code', - isMenuHeader = true, -- Set to true to make a nonclickable title - }, - { - header = 'First Button', - txt = 'Open a secondary menu!', - icon = 'fas fa-code-pull-request', - -- disabled = false, -- optional, non-clickable and grey scale - -- hidden = true, -- optional, hides the button completely - params = { - -- isServer = false, -- optional, specify event type - event = 'community_bridge:client:TestEvent', - args = { - number = 1, - } - } - }, - { - header = 'Second Button', - txt = 'Open a secondary menu!', - icon = 'fas fa-code-pull-request', - params = { - event = 'community_bridge:client:TestEvent', - args = { - number = 2, - } - } - } -} - -local oxMenu = { - id = "test", - title = "Test Menu", - options = { - { - title = "First Button", - description = "Open a secondary menu!", - icon = "fas fa-code-pull-request", - args = { - number = 1, - }, - onSelect = function(selected, secondary, args) - print("Selected", json.encode(selected)) - end - }, - { - title = "Second Button", - description = "Open a secondary menu!", - icon = "fas fa-code-pull-request", - args = { - number = 2, - }, - onSelect = function(selected, secondary, args) - print("Selected", json.encode(selected)) - end - } - } -} - -RegisterCommand("testmenu-qbtoox", function() - Menu.Open(qbMenu, true) -end) - -RegisterCommand("testmenu-oxtoqb", function() - Menu.Open(oxMenu, false) -end) - -RegisterCommand("testmenu-oxtoox", function() - Menu.Open(oxMenu, false) -end) - -RegisterCommand("testmenu-qbtoqb", function() - Menu.Open(qbMenu, true) -end) - -RegisterNetEvent('community_bridge:client:TestEvent', function(args) - print("Test Event", json.encode(args)) -end) - ---]] \ No newline at end of file +return Menu \ No newline at end of file diff --git a/modules/progressbar/ox_lib/client.lua b/modules/progressbar/ox_lib/client.lua index 153cb3e..60bb24d 100644 --- a/modules/progressbar/ox_lib/client.lua +++ b/modules/progressbar/ox_lib/client.lua @@ -1,9 +1,13 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "ox_lib" local configValue = BridgeClientConfig.ProgressBarSystem if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ProgressBar = ProgressBar or {} +---This function converts a QB progress bar options table to an Ox progress bar options table. +---@param options table +---@return table local function convertFromQB(options) if not options then return options end local prop1 = options.prop or {} @@ -46,9 +50,8 @@ end ---This function opens a progress bar. ---@param options table ---@param cb any ----@param isQBInput boolean +---@param isQBInput boolean||optional ---@return boolean ----@diagnostic disable-next-line: duplicate-set-field function ProgressBar.Open(options, cb, isQBInput) if isQBInput then options = convertFromQB(options) diff --git a/modules/progressbar/qb-progressbar/client.lua b/modules/progressbar/qb-progressbar/client.lua index a0433fa..11fb7e4 100644 --- a/modules/progressbar/qb-progressbar/client.lua +++ b/modules/progressbar/qb-progressbar/client.lua @@ -1,9 +1,13 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "progressbar" local configValue = BridgeClientConfig.ProgressBarSystem if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ProgressBar = ProgressBar or {} +---This function converts an Ox progress bar options table to a QB progress bar options table. +---@param options table +---@return table local function convertFromOx(options) if not options then return options end local prop1 = options.prop?[1] or options.prop or {} @@ -34,7 +38,7 @@ local function convertFromOx(options) propTwo = { model = prop2.model, bone = prop2.bone, - coords = prop2.pos, + coords = prop2.pos, rotation = prop2.rot } } @@ -45,7 +49,6 @@ end ---@param cb any ---@param qbFormat boolean ---@return boolean boolean ----@diagnostic disable-next-line: duplicate-set-field function ProgressBar.Open(options, cb, qbFormat) if not exports['progressbar'] then return false end diff --git a/modules/shops/_default/server.lua b/modules/shops/_default/server.lua index a4ac7b4..dc5e7a3 100644 --- a/modules/shops/_default/server.lua +++ b/modules/shops/_default/server.lua @@ -2,7 +2,7 @@ Shops = Shops or {} local registeredShops = {} ----commentThis can open a shop for the client +---This can open a shop for the client ---@param src number ---@param shopTitle string ---@return boolean diff --git a/modules/skills/_default/client.lua b/modules/skills/_default/client.lua index 74f9d3e..d1b4b4e 100644 --- a/modules/skills/_default/client.lua +++ b/modules/skills/_default/client.lua @@ -1,17 +1,23 @@ +---@diagnostic disable: duplicate-set-field Skills = Skills or {} local function warnUser() print("Currently only a few skill systems are supported by Community Bridge, you are using a resource that requires the skills module to be used.") end ----@diagnostic disable-next-line: duplicate-set-field +---This will get the name of the Skills system being being used. +---@return string Skills.GetResourceName = function() return "none" end ----@diagnostic disable-next-line: duplicate-set-field +---This will get the skill level of the passed skill name. +---@param skillName string +---@return number +---@return nil Skills.GetSkillLevel = function(skillName) - return 0, warnUser() + warnUser() + return 0 end return Skills \ No newline at end of file diff --git a/modules/skills/_default/server.lua b/modules/skills/_default/server.lua index e1b2302..8d2f333 100644 --- a/modules/skills/_default/server.lua +++ b/modules/skills/_default/server.lua @@ -1,27 +1,43 @@ +---@diagnostic disable: duplicate-set-field Skills = Skills or {} local function warnUser() print("Currently only a few skill systems are supported by Community Bridge, you are using a resource that requires the skills module to be used.") end ----@diagnostic disable-next-line: duplicate-set-field +---This will get the name of the Skills system being being used. +---@return string Skills.GetResourceName = function() return "none" end ----@diagnostic disable-next-line: duplicate-set-field +---This will get the skill level of the passed skill name. +---@param src number +---@param skillName string +---@return number Skills.GetSkillLevel = function(src, skillName) - return 0, warnUser() + warnUser() + return 0 end ----@diagnostic disable-next-line: duplicate-set-field +---This will add xp to the passed skill name. +---@param src number +---@param skillName string +---@param amount number +---@return boolean Skills.AddXp = function(src, skillName, amount) - return false, warnUser() + warnUser() + return false end ----@diagnostic disable-next-line: duplicate-set-field +---This will remove xp from the passed skill name. +---@param src number +---@param skillName string +---@param amount number +---@return boolean Skills.RemoveXp = function(src, skillName, amount) - return false, warnUser() + warnUser() + return false end return Skills \ No newline at end of file diff --git a/modules/skills/evolent_skills/client.lua b/modules/skills/evolent_skills/client.lua index 745b5a8..b471888 100644 --- a/modules/skills/evolent_skills/client.lua +++ b/modules/skills/evolent_skills/client.lua @@ -1,14 +1,18 @@ +---@diagnostic disable: duplicate-set-field Skills = Skills or {} local resourceName = "evolent_skills" local configValue = BridgeSharedConfig.Skills if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field +---This will get the name of the Skills system being used. +---@return string Skills.GetResourceName = function() return resourceName end ----@diagnostic disable-next-line: duplicate-set-field +---This will return the skill level of the passed skill name. +---@param skillName string +---@return number Skills.GetSkillLevel = function(skillName) local skillData = exports.evolent_skills:getSkillLevel(skillName) return skillData or 0 diff --git a/modules/skills/evolent_skills/server.lua b/modules/skills/evolent_skills/server.lua index 935a184..56a4700 100644 --- a/modules/skills/evolent_skills/server.lua +++ b/modules/skills/evolent_skills/server.lua @@ -1,20 +1,30 @@ +---@diagnostic disable: duplicate-set-field + Skills = Skills or {} local resourceName = "evolent_skills" local configValue = BridgeSharedConfig.Skills if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field +---This will get the name of the Skills system being used. +---@return string Skills.GetResourceName = function() return resourceName end ----@diagnostic disable-next-line: duplicate-set-field +---This will return the skill level of the passed skill name. +---@param src number +---@param skillName string +---@return number Skills.GetSkillLevel = function(src, skillName) local skillData = exports.evolent_skills:getSkillLevel(src, skillName) return skillData or 0 end ----@diagnostic disable-next-line: duplicate-set-field +---This will add xp to the passed skill name. +---@param src number +---@param skillName string +---@param amount number +---@return boolean Skills.AddXp = function(src, skillName, amount) local skillData = exports.evolent_skills:getSkillLevel(src, skillName) if not skillData then return false, print("Skill not found") end @@ -22,7 +32,11 @@ Skills.AddXp = function(src, skillName, amount) return true end ----@diagnostic disable-next-line: duplicate-set-field +---This will remove xp from the passed skill name. +---@param src number +---@param skillName string +---@param amount number +---@return boolean Skills.RemoveXp = function(src, skillName, amount) local skillData = exports.evolent_skills:getSkillLevel(src, skillName) if not skillData then return false, print("Skill not found") end diff --git a/modules/skills/ot_skills/client.lua b/modules/skills/ot_skills/client.lua index 4d0e9f1..d619467 100644 --- a/modules/skills/ot_skills/client.lua +++ b/modules/skills/ot_skills/client.lua @@ -1,14 +1,19 @@ +---@diagnostic disable: duplicate-set-field + Skills = Skills or {} local resourceName = "OT_skills" local configValue = BridgeSharedConfig.Skills if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field +---This will return the name of the Skills system being used. +---@return string Skills.GetResourceName = function() return resourceName end ----@diagnostic disable-next-line: duplicate-set-field +---This will return the skill level of the passed skill name. +---@param skillName string +---@return number Skills.GetSkillLevel = function(skillName) local skillData = exports.OT_skills:getSkill(skillName) return skillData.level or 0 diff --git a/modules/skills/ot_skills/server.lua b/modules/skills/ot_skills/server.lua index 7685012..ba0c39b 100644 --- a/modules/skills/ot_skills/server.lua +++ b/modules/skills/ot_skills/server.lua @@ -1,19 +1,30 @@ +---@diagnostic disable: duplicate-set-field + Skills = Skills or {} local resourceName = "OT_skills" local configValue = BridgeSharedConfig.Skills if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field +---This will return the name of the Skills system being used. +---@return string Skills.GetResourceName = function() return resourceName end ----@diagnostic disable-next-line: duplicate-set-field +---This will return the skill level of the passed skill name. +---@param src number +---@param skillName string +---@return number Skills.GetSkillLevel = function(src, skillName) local skillData = exports.OT_skills:getSkill(src, skillName) return skillData.level or 0 end +---This will add xp to the passed skill name. +---@param src number +---@param skillName string +---@param amount number +---@return boolean Skills.AddXp = function(src, skillName, amount) local skillData = exports.OT_skills:getSkill(src, skillName) if not skillData then return false, print("Skill not found") end @@ -21,6 +32,11 @@ Skills.AddXp = function(src, skillName, amount) return true end +---This will remove xp from the passed skill name. +---@param src number +---@param skillName string +---@param amount number +---@return boolean Skills.RemoveXp = function(src, skillName, amount) local skillData = exports.OT_skills:getSkill(src, skillName) if not skillData then return false, print("Skill not found") end diff --git a/modules/skills/pickle_xp/client.lua b/modules/skills/pickle_xp/client.lua index 4692acc..89bd99b 100644 --- a/modules/skills/pickle_xp/client.lua +++ b/modules/skills/pickle_xp/client.lua @@ -1,16 +1,20 @@ +---@diagnostic disable: duplicate-set-field Skills = Skills or {} local resourceName = "pickle_xp" local configValue = BridgeSharedConfig.Skills if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field +---This will get the name of the Skills system being used. +---@return string Skills.GetResourceName = function() return resourceName end ----@diagnostic disable-next-line: duplicate-set-field +---This will return the skill level of the passed skill name. +---@param skillName string +---@return number Skills.GetSkillLevel = function(skillName) - local skillData = exports.OT_skills:GetLevel(skillName) + local skillData = exports.pickle_xp:GetLevel(skillName) return skillData or 0 end diff --git a/modules/skills/pickle_xp/server.lua b/modules/skills/pickle_xp/server.lua index 82ef781..4a00ae0 100644 --- a/modules/skills/pickle_xp/server.lua +++ b/modules/skills/pickle_xp/server.lua @@ -1,19 +1,30 @@ +---@diagnostic disable: duplicate-set-field + Skills = Skills or {} local resourceName = "pickle_xp" local configValue = BridgeSharedConfig.Skills if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field +---This will get the name of the Skills system being used. +---@return string Skills.GetResourceName = function() return resourceName end ----@diagnostic disable-next-line: duplicate-set-field +---This will return the skill level of the passed skill name. +---@param src number +---@param skillName string +---@return number Skills.GetSkillLevel = function(src, skillName) local skillData = exports.pickle_xp:GetPlayerLevel(src, skillName) return skillData or 0 end +---This will add xp to the passed skill name. +---@param src number +---@param skillName string +---@param amount number +---@return boolean Skills.AddXp = function(src, skillName, amount) local skillData = exports.pickle_xp:GetPlayerLevel(src, skillName) if not skillData then return false, print("Skill not found") end @@ -21,6 +32,11 @@ Skills.AddXp = function(src, skillName, amount) return true end +---This will remove xp from the passed skill name. +---@param src number +---@param skillName string +---@param amount number +---@return boolean Skills.RemoveXp = function(src, skillName, amount) local skillData = exports.pickle_xp:GetPlayerLevel(src, skillName) if not skillData then return false, print("Skill not found") end diff --git a/modules/target/_default/client.lua b/modules/target/_default/client.lua index 37581d7..25a3478 100644 --- a/modules/target/_default/client.lua +++ b/modules/target/_default/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field Target = Target or {} local function warnUser() diff --git a/modules/target/ox_target/client.lua b/modules/target/ox_target/client.lua index 363c224..b5b7d17 100644 --- a/modules/target/ox_target/client.lua +++ b/modules/target/ox_target/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "ox_target" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/target/qb-target/client.lua b/modules/target/qb-target/client.lua index 9223204..79a6163 100644 --- a/modules/target/qb-target/client.lua +++ b/modules/target/qb-target/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "qb-target" if GetResourceState(resourceName) == 'missing' then return end if GetResourceState("ox_target") == 'started' then return end diff --git a/modules/target/sleepless_interact/client.lua b/modules/target/sleepless_interact/client.lua index 164fc18..b6011a7 100644 --- a/modules/target/sleepless_interact/client.lua +++ b/modules/target/sleepless_interact/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "sleepless_interact" if GetResourceState(resourceName) == 'missing' then return end if GetResourceState("ox_target") == 'started' then return end diff --git a/modules/vehicleKey/F_RealCarKeysSystem/client/client.lua b/modules/vehicleKey/F_RealCarKeysSystem/client/client.lua index df7220b..249c770 100644 --- a/modules/vehicleKey/F_RealCarKeysSystem/client/client.lua +++ b/modules/vehicleKey/F_RealCarKeysSystem/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "F_RealCarKeysSystem" if GetResourceState(resourceName) == 'missing' then return end VehicleKey = VehicleKey or {} diff --git a/modules/vehicleKey/MrNewbVehicleKeys/client/client.lua b/modules/vehicleKey/MrNewbVehicleKeys/client/client.lua index 43e9f8a..a05405f 100644 --- a/modules/vehicleKey/MrNewbVehicleKeys/client/client.lua +++ b/modules/vehicleKey/MrNewbVehicleKeys/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "MrNewbVehicleKeys" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/Renewed-Vehiclekeys/client/client.lua b/modules/vehicleKey/Renewed-Vehiclekeys/client/client.lua index d697701..62e4da7 100644 --- a/modules/vehicleKey/Renewed-Vehiclekeys/client/client.lua +++ b/modules/vehicleKey/Renewed-Vehiclekeys/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "Renewed-Vehiclekeys" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/_default/client/client.lua b/modules/vehicleKey/_default/client/client.lua index 283a143..adb02d3 100644 --- a/modules/vehicleKey/_default/client/client.lua +++ b/modules/vehicleKey/_default/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field VehicleKey = VehicleKey or {} ---This will give keys to the specifed vehicle/plate. diff --git a/modules/vehicleKey/cd_garage/client/client.lua b/modules/vehicleKey/cd_garage/client/client.lua index a2bcfc1..9ab85d1 100644 --- a/modules/vehicleKey/cd_garage/client/client.lua +++ b/modules/vehicleKey/cd_garage/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "cd_garage" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/jacksam/client.lua b/modules/vehicleKey/jacksam/client.lua index 88c92ca..0da5d3e 100644 --- a/modules/vehicleKey/jacksam/client.lua +++ b/modules/vehicleKey/jacksam/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "jaksams_VehiclesKeys" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/mk_vehiclekeys/client/client.lua b/modules/vehicleKey/mk_vehiclekeys/client/client.lua index d66b816..0c7d643 100644 --- a/modules/vehicleKey/mk_vehiclekeys/client/client.lua +++ b/modules/vehicleKey/mk_vehiclekeys/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "mk_vehiclekeys" if GetResourceState(resourceName) == 'missing' then return end VehicleKey = VehicleKey or {} diff --git a/modules/vehicleKey/mono_carkeys/client/client.lua b/modules/vehicleKey/mono_carkeys/client/client.lua index 6796dfc..7ee881a 100644 --- a/modules/vehicleKey/mono_carkeys/client/client.lua +++ b/modules/vehicleKey/mono_carkeys/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "mono_carkeys" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/okokGarage/client/client.lua b/modules/vehicleKey/okokGarage/client/client.lua index d2b8d65..705c2f0 100644 --- a/modules/vehicleKey/okokGarage/client/client.lua +++ b/modules/vehicleKey/okokGarage/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "okokGarage" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/qb-vehiclekeys/client/client.lua b/modules/vehicleKey/qb-vehiclekeys/client/client.lua index 865f81d..861c8d8 100644 --- a/modules/vehicleKey/qb-vehiclekeys/client/client.lua +++ b/modules/vehicleKey/qb-vehiclekeys/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "qb-vehiclekeys" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/qbx_vehiclekeys/client/client.lua b/modules/vehicleKey/qbx_vehiclekeys/client/client.lua index d617ac4..0502ac1 100644 --- a/modules/vehicleKey/qbx_vehiclekeys/client/client.lua +++ b/modules/vehicleKey/qbx_vehiclekeys/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "qbx_vehiclekeys" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/qs-vehiclekeys/client/client.lua b/modules/vehicleKey/qs-vehiclekeys/client/client.lua index 79a79cd..2280713 100644 --- a/modules/vehicleKey/qs-vehiclekeys/client/client.lua +++ b/modules/vehicleKey/qs-vehiclekeys/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "qs-vehiclekeys" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/t1ger_keys/client/client.lua b/modules/vehicleKey/t1ger_keys/client/client.lua index 4b44183..a040a7a 100644 --- a/modules/vehicleKey/t1ger_keys/client/client.lua +++ b/modules/vehicleKey/t1ger_keys/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "t1ger_keys" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/vehicleKey/wasabi_carlock/client/client.lua b/modules/vehicleKey/wasabi_carlock/client/client.lua index 2db6d9e..bde20f5 100644 --- a/modules/vehicleKey/wasabi_carlock/client/client.lua +++ b/modules/vehicleKey/wasabi_carlock/client/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field local resourceName = "wasabi_carlock" if GetResourceState(resourceName) == 'missing' then return end diff --git a/modules/weather/_default/client.lua b/modules/weather/_default/client.lua index 095bf46..7625ab6 100644 --- a/modules/weather/_default/client.lua +++ b/modules/weather/_default/client.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field Weather = Weather or {} ---This will toggle the players weather/time sync diff --git a/modules/weather/cd_easytime/client.lua b/modules/weather/cd_easytime/client.lua index d658766..210ca56 100644 --- a/modules/weather/cd_easytime/client.lua +++ b/modules/weather/cd_easytime/client.lua @@ -1,8 +1,10 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('cd_easytime') == 'missing' then return end Weather = Weather or {} ----comment +---This will toggle the players weather/time sync ---@param toggle boolean +---@return nil Weather.ToggleSync = function(toggle) TriggerEvent('cd_easytime:PauseSync', toggle) end diff --git a/modules/weather/qb-weathersync/client/client.lua b/modules/weather/qb-weathersync/client/client.lua index 28ba8d5..548bc23 100644 --- a/modules/weather/qb-weathersync/client/client.lua +++ b/modules/weather/qb-weathersync/client/client.lua @@ -1,8 +1,10 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('qb-weathersync') == 'missing' then return end Weather = Weather or {} ----comment +---This will toggle the players weather/time sync ---@param toggle boolean +---@return nil Weather.ToggleSync = function(toggle) if toggle then TriggerEvent("qb-weathersync:client:EnableSync") diff --git a/modules/weather/renewed-weathersync/client/client.lua b/modules/weather/renewed-weathersync/client/client.lua index 2a1f471..9d4d460 100644 --- a/modules/weather/renewed-weathersync/client/client.lua +++ b/modules/weather/renewed-weathersync/client/client.lua @@ -1,8 +1,10 @@ +---@diagnostic disable: duplicate-set-field if GetResourceState('Renewed-Weathersync') == 'missing' then return end Weather = Weather or {} ----comment +---This will toggle the players weather/time sync ---@param toggle boolean +---@return nil Weather.ToggleSync = function(toggle) LocalPlayer.state.syncWeather = toggle end