diff --git a/modules/notify/_default/client.lua b/modules/notify/_default/client.lua index 72a5c40..7aef40d 100644 --- a/modules/notify/_default/client.lua +++ b/modules/notify/_default/client.lua @@ -1,6 +1,6 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} ----@diagnostic disable-next-line: duplicate-set-field Notify.GetResourceName = function() return "none" end @@ -10,7 +10,6 @@ end ---@param _type string ---@param time number ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(message, _type, time) time = time or 3000 return Framework.Notify(message, nil, time) @@ -21,10 +20,8 @@ RegisterNetEvent('community_bridge:Client:Notify', function(message, _type, time end) ---------[[Depricated Stuff Below, please adjust to the HelpText module instead]]-------- - ---Depricated: This will hide the help text message on the screen ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.HideHelpText = function() return HelpText.HideHelpText() end @@ -32,7 +29,6 @@ end ---Depricated: This will show a help text message at the screen position passed ---@param message string ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.ShowHelpText = function(message, position) return HelpText.ShowHelpText(message, position) end diff --git a/modules/notify/_default/server.lua b/modules/notify/_default/server.lua index a6f5d41..fab0ddc 100644 --- a/modules/notify/_default/server.lua +++ b/modules/notify/_default/server.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} ---This will send a notification to the specified player of the passed message and type @@ -5,29 +6,21 @@ Notify = Notify or {} ---@param message string ---@param _type string ---@param time number ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(src, message, _type, time) TriggerClientEvent('community_bridge:Client:Notify', src, message, _type, time) end - - ---------[[Depricated Stuff Below, please adjust to the HelpText module instead]]-------- ---- ---- ---- ---Depricated -- This will show a help text message to the specified player at the screen position passed ---@param src number ---@param message string ---@param position string ----@diagnostic disable-next-line: duplicate-set-field Notify.ShowHelpText = function(src, message, position) return HelpText.ShowHelpText(src, message, position) end ---Depricated -- This will hide the help text message on the screen for the specified player ---@param src number ----@diagnostic disable-next-line: duplicate-set-field Notify.HideHelpText = function(src) return HelpText.HideHelpText(src) end diff --git a/modules/notify/mythic_notify/client.lua b/modules/notify/mythic_notify/client.lua index b276ef5..0538d61 100644 --- a/modules/notify/mythic_notify/client.lua +++ b/modules/notify/mythic_notify/client.lua @@ -1,9 +1,9 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} local resourceName = "mythic_notify" local configValue = BridgeSharedConfig.Notify if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field Notify.GetResourceName = function() return resourceName end @@ -13,7 +13,6 @@ end ---@param _type string ---@param time number ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(message, _type, time) time = time or 3000 return exports['mythic_notify']:SendAlert('inform', message, time) diff --git a/modules/notify/okokNotify/client.lua b/modules/notify/okokNotify/client.lua index 6375bab..1a158ea 100644 --- a/modules/notify/okokNotify/client.lua +++ b/modules/notify/okokNotify/client.lua @@ -1,9 +1,9 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} local resourceName = "okokNotify" local configValue = BridgeSharedConfig.Notify if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field Notify.GetResourceName = function() return resourceName end @@ -13,7 +13,6 @@ end ---@param _type string ---@param time number ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(message, _type, time) time = time or 3000 return exports['okokNotify']:Alert('Notification', message, time, _type, false) diff --git a/modules/notify/ox_lib/client.lua b/modules/notify/ox_lib/client.lua index 037dc95..83406d7 100644 --- a/modules/notify/ox_lib/client.lua +++ b/modules/notify/ox_lib/client.lua @@ -1,10 +1,10 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} local resourceName = "ox_lib" local configValue = BridgeSharedConfig.Notify if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field Notify.GetResourceName = function() return resourceName end @@ -14,7 +14,6 @@ end ---@param _type string ---@param time number ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(message, _type, time) time = time or 3000 return exports.ox_lib:notify({ description = message, type = _type, position = 'center-left' }) diff --git a/modules/notify/pNotify/client.lua b/modules/notify/pNotify/client.lua index 7cbf356..a79f24b 100644 --- a/modules/notify/pNotify/client.lua +++ b/modules/notify/pNotify/client.lua @@ -1,9 +1,9 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} local resourceName = "pNotify" local configValue = BridgeSharedConfig.Notify if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field Notify.GetResourceName = function() return resourceName end @@ -13,7 +13,6 @@ end ---@param _type string ---@param time number ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(message, _type, time) time = time or 3000 return exports['pNotify']:SendNotification({ text = message, type = _type, timeout = time, layout = 'centerRight' }) diff --git a/modules/notify/r_notify/client.lua b/modules/notify/r_notify/client.lua index 4b12e9e..d8305a8 100644 --- a/modules/notify/r_notify/client.lua +++ b/modules/notify/r_notify/client.lua @@ -1,9 +1,9 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} local resourceName = "r_notify" local configValue = BridgeSharedConfig.Notify if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field Notify.GetResourceName = function() return resourceName end @@ -13,7 +13,6 @@ end ---@param _type string ---@param time number ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(message, _type, time) time = time or 3000 return exports.r_notify:notify({title = 'Notification', content = message, type = _type, icon = "fas fa-check", duration = time, position = 'top-right', sound = false}) diff --git a/modules/notify/t-notify/client.lua b/modules/notify/t-notify/client.lua index 0dcc4c4..3c452c0 100644 --- a/modules/notify/t-notify/client.lua +++ b/modules/notify/t-notify/client.lua @@ -1,9 +1,9 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} local resourceName = "t-notify" local configValue = BridgeSharedConfig.Notify if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field Notify.GetResourceName = function() return resourceName end @@ -13,7 +13,6 @@ end ---@param _type string ---@param time number ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(message, _type, time) time = time or 3000 return exports['t-notify']:Alert({ style = 'info', message = message, duration = time, }) diff --git a/modules/notify/wasabi_notify/client.lua b/modules/notify/wasabi_notify/client.lua index f4d83f5..7fe692f 100644 --- a/modules/notify/wasabi_notify/client.lua +++ b/modules/notify/wasabi_notify/client.lua @@ -1,9 +1,9 @@ +---@diagnostic disable: duplicate-set-field Notify = Notify or {} local resourceName = "wasabi_notify" local configValue = BridgeSharedConfig.Notify if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end ----@diagnostic disable-next-line: duplicate-set-field Notify.GetResourceName = function() return resourceName end @@ -13,7 +13,6 @@ end ---@param _type string ---@param time number ---@return nil ----@diagnostic disable-next-line: duplicate-set-field Notify.SendNotify = function(message, _type, time) time = time or 3000 return exports.wasabi_notify:notify(_type, message, time, _type)