---@diagnostic disable: duplicate-set-field

This commit is contained in:
MrNewb committed 2025-06-08 19:52:24 -04:00
1 parent 33868c43c4
commit 3ff7bf2fea
9 files changed
+9 -27

No files matched your search

+1 -5
View File
@@ -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
+1 -8
View File
@@ -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
+1 -2
View File
@@ -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)
+1 -2
View File
@@ -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)
+1 -2
View File
@@ -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' })
+1 -2
View File
@@ -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' })
+1 -2
View File
@@ -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})
+1 -2
View File
@@ -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, })
+1 -2
View File
@@ -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)