---@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 {} Notify = Notify or {}
---@diagnostic disable-next-line: duplicate-set-field
Notify.GetResourceName = function() Notify.GetResourceName = function()
return "none" return "none"
end end
@@ -10,7 +10,6 @@ end
---@param _type string ---@param _type string
---@param time number ---@param time number
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time) Notify.SendNotify = function(message, _type, time)
time = time or 3000 time = time or 3000
return Framework.Notify(message, nil, time) return Framework.Notify(message, nil, time)
@@ -21,10 +20,8 @@ RegisterNetEvent('community_bridge:Client:Notify', function(message, _type, time
end) end)
---------[[Depricated Stuff Below, please adjust to the HelpText module instead]]-------- ---------[[Depricated Stuff Below, please adjust to the HelpText module instead]]--------
---Depricated: This will hide the help text message on the screen ---Depricated: This will hide the help text message on the screen
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.HideHelpText = function() Notify.HideHelpText = function()
return HelpText.HideHelpText() return HelpText.HideHelpText()
end end
@@ -32,7 +29,6 @@ end
---Depricated: This will show a help text message at the screen position passed ---Depricated: This will show a help text message at the screen position passed
---@param message string ---@param message string
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.ShowHelpText = function(message, position) Notify.ShowHelpText = function(message, position)
return HelpText.ShowHelpText(message, position) return HelpText.ShowHelpText(message, position)
end end
+1 -8
View File
@@ -1,3 +1,4 @@
---@diagnostic disable: duplicate-set-field
Notify = Notify or {} Notify = Notify or {}
---This will send a notification to the specified player of the passed message and type ---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 message string
---@param _type string ---@param _type string
---@param time number ---@param time number
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(src, message, _type, time) Notify.SendNotify = function(src, message, _type, time)
TriggerClientEvent('community_bridge:Client:Notify', src, message, _type, time) TriggerClientEvent('community_bridge:Client:Notify', src, message, _type, time)
end end
---------[[Depricated Stuff Below, please adjust to the HelpText module instead]]-------- ---------[[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 ---Depricated -- This will show a help text message to the specified player at the screen position passed
---@param src number ---@param src number
---@param message string ---@param message string
---@param position string ---@param position string
---@diagnostic disable-next-line: duplicate-set-field
Notify.ShowHelpText = function(src, message, position) Notify.ShowHelpText = function(src, message, position)
return HelpText.ShowHelpText(src, message, position) return HelpText.ShowHelpText(src, message, position)
end end
---Depricated -- This will hide the help text message on the screen for the specified player ---Depricated -- This will hide the help text message on the screen for the specified player
---@param src number ---@param src number
---@diagnostic disable-next-line: duplicate-set-field
Notify.HideHelpText = function(src) Notify.HideHelpText = function(src)
return HelpText.HideHelpText(src) return HelpText.HideHelpText(src)
end end
+1 -2
View File
@@ -1,9 +1,9 @@
---@diagnostic disable: duplicate-set-field
Notify = Notify or {} Notify = Notify or {}
local resourceName = "mythic_notify" local resourceName = "mythic_notify"
local configValue = BridgeSharedConfig.Notify local configValue = BridgeSharedConfig.Notify
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end 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() Notify.GetResourceName = function()
return resourceName return resourceName
end end
@@ -13,7 +13,6 @@ end
---@param _type string ---@param _type string
---@param time number ---@param time number
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time) Notify.SendNotify = function(message, _type, time)
time = time or 3000 time = time or 3000
return exports['mythic_notify']:SendAlert('inform', message, time) return exports['mythic_notify']:SendAlert('inform', message, time)
+1 -2
View File
@@ -1,9 +1,9 @@
---@diagnostic disable: duplicate-set-field
Notify = Notify or {} Notify = Notify or {}
local resourceName = "okokNotify" local resourceName = "okokNotify"
local configValue = BridgeSharedConfig.Notify local configValue = BridgeSharedConfig.Notify
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end 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() Notify.GetResourceName = function()
return resourceName return resourceName
end end
@@ -13,7 +13,6 @@ end
---@param _type string ---@param _type string
---@param time number ---@param time number
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time) Notify.SendNotify = function(message, _type, time)
time = time or 3000 time = time or 3000
return exports['okokNotify']:Alert('Notification', message, time, _type, false) 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 {} Notify = Notify or {}
local resourceName = "ox_lib" local resourceName = "ox_lib"
local configValue = BridgeSharedConfig.Notify local configValue = BridgeSharedConfig.Notify
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end 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() Notify.GetResourceName = function()
return resourceName return resourceName
end end
@@ -14,7 +14,6 @@ end
---@param _type string ---@param _type string
---@param time number ---@param time number
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time) Notify.SendNotify = function(message, _type, time)
time = time or 3000 time = time or 3000
return exports.ox_lib:notify({ description = message, type = _type, position = 'center-left' }) 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 {} Notify = Notify or {}
local resourceName = "pNotify" local resourceName = "pNotify"
local configValue = BridgeSharedConfig.Notify local configValue = BridgeSharedConfig.Notify
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end 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() Notify.GetResourceName = function()
return resourceName return resourceName
end end
@@ -13,7 +13,6 @@ end
---@param _type string ---@param _type string
---@param time number ---@param time number
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time) Notify.SendNotify = function(message, _type, time)
time = time or 3000 time = time or 3000
return exports['pNotify']:SendNotification({ text = message, type = _type, timeout = time, layout = 'centerRight' }) 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 {} Notify = Notify or {}
local resourceName = "r_notify" local resourceName = "r_notify"
local configValue = BridgeSharedConfig.Notify local configValue = BridgeSharedConfig.Notify
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end 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() Notify.GetResourceName = function()
return resourceName return resourceName
end end
@@ -13,7 +13,6 @@ end
---@param _type string ---@param _type string
---@param time number ---@param time number
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time) Notify.SendNotify = function(message, _type, time)
time = time or 3000 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}) 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 {} Notify = Notify or {}
local resourceName = "t-notify" local resourceName = "t-notify"
local configValue = BridgeSharedConfig.Notify local configValue = BridgeSharedConfig.Notify
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end 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() Notify.GetResourceName = function()
return resourceName return resourceName
end end
@@ -13,7 +13,6 @@ end
---@param _type string ---@param _type string
---@param time number ---@param time number
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time) Notify.SendNotify = function(message, _type, time)
time = time or 3000 time = time or 3000
return exports['t-notify']:Alert({ style = 'info', message = message, duration = time, }) 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 {} Notify = Notify or {}
local resourceName = "wasabi_notify" local resourceName = "wasabi_notify"
local configValue = BridgeSharedConfig.Notify local configValue = BridgeSharedConfig.Notify
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end 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() Notify.GetResourceName = function()
return resourceName return resourceName
end end
@@ -13,7 +13,6 @@ end
---@param _type string ---@param _type string
---@param time number ---@param time number
---@return nil ---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time) Notify.SendNotify = function(message, _type, time)
time = time or 3000 time = time or 3000
return exports.wasabi_notify:notify(_type, message, time, _type) return exports.wasabi_notify:notify(_type, message, time, _type)