misc cleanup

Adjusted force config values to match the required values. Also removed unused config options.
Swapped default logger to built-in
This commit is contained in:
MrNewb committed 2025-04-28 10:31:14 -04:00
1 parent 6e418f406c
commit 4138bc84ef
13 files changed
+23 -11

No files matched your search

+1
View File
@@ -1,5 +1,6 @@
Phone = Phone or {}
---@diagnostic disable-next-line: duplicate-set-field
Phone.SendEmail = function(email, title, message)
return false, Print.Error('There Is No Phone Bridged.')
end
+2
View File
@@ -1,9 +1,11 @@
Phone = Phone or {}
---@diagnostic disable-next-line: duplicate-set-field
Phone.GetPlayerPhone = function(src)
return false, Print.Error('There Is No Phone Bridged.')
end
---@diagnostic disable-next-line: duplicate-set-field
Phone.SendEmail = function(src, email, title, message)
return false, Print.Error('There Is No Phone Bridged.')
end
+1
View File
@@ -9,6 +9,7 @@ Phone = Phone or {}
---@param title string
---@param message string
---@return boolean
---@diagnostic disable-next-line: duplicate-set-field
Phone.SendEmail = function(email, title, message)
return exports["gksphone"]:SendNewMail({ sender = email, image = '/html/static/img/icons/mail.png', subject = title, message = message })
end
+3 -1
View File
@@ -5,7 +5,8 @@ Phone = Phone or {}
---comment
---@param src number
---@return number||boolean
---@return number| boolean
---@diagnostic disable-next-line: duplicate-set-field
Phone.GetPlayerPhone = function(src)
return exports["gksphone"]:GetPhoneBySource(src) or false
end
@@ -16,6 +17,7 @@ end
---@param title string
---@param message string
---@return boolean
---@diagnostic disable-next-line: duplicate-set-field
Phone.SendEmail = function(src, email, title, message)
local data = {}
data.sender = email
+1
View File
@@ -8,6 +8,7 @@ Phone = Phone or {}
---@param title string
---@param message string
---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Phone.SendEmail = function(email, title, message)
TriggerServerEvent('community_bridge:Server:genericEmail', {email = email, title = title, message = message})
end
+2
View File
@@ -3,6 +3,7 @@ local configValue = BridgeSharedConfig.Phone
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
Phone = Phone or {}
---@diagnostic disable-next-line: duplicate-set-field
Phone.GetPlayerPhone = function(src)
return exports["lb-phone"]:GetEquippedPhoneNumber(src) or false
end
@@ -13,6 +14,7 @@ end
---@param title string
---@param message string
---@return boolean
---@diagnostic disable-next-line: duplicate-set-field
Phone.SendEmail = function(src, email, title, message)
local numberNumber = exports["lb-phone"]:GetEquippedPhoneNumber(src)
if not numberNumber then return false, Prints.Error("Could not Find Phone number") end
+2 -2
View File
@@ -8,11 +8,11 @@ Phone = Phone or {}
---@param title string
---@param message string
---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Phone.SendEmail = function(email, title, message)
return TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = email, subject = title, message = message, button = {} })
return true, TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = email, subject = title, message = message, button = {} })
end
RegisterNetEvent('community_bridge:Server:genericEmail', function(data)
TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = data.email, subject = data.title, message = data.message, button = {} })
return true
end)
+2
View File
@@ -2,9 +2,11 @@ local resourceName = "qs-smartphone"
local configValue = BridgeSharedConfig.Phone
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
Phone = Phone or {}
---comment
---@param src number
---@return number||boolean
---@diagnostic disable-next-line: duplicate-set-field
Phone.GetPlayerPhone = function(src)
return exports['qs-base']:GetPlayerPhone(src) or false
end
+1
View File
@@ -49,6 +49,7 @@ end
---@param cb any
---@param isQBInput boolean
---@return nil
---@diagnostic disable-next-line: duplicate-set-field
function ProgressBar.Open(options, cb, isQBInput)
if isQBInput then
options = convertFromQB(options)
@@ -45,6 +45,7 @@ end
---@param cb any
---@param qbFormat boolean
---@return success boolean
---@diagnostic disable-next-line: duplicate-set-field
function ProgressBar.Open(options, cb, qbFormat)
if not exports['progressbar'] then return false end