diff --git a/fxmanifest.lua b/fxmanifest.lua index b2f17b5..5e4a52f 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -5,7 +5,7 @@ use_experimental_fxv2_oal 'yes' author 'The Order of the Sacred Framework' name 'community_bridge' description 'A Universal Bridge for Our Community, created by a group of contributors with a shared vision to enhance both user and developer experiences. This bridge connects various frameworks, inventories, target systems, notification systems, and more, fostering compatibility and seamless integration.' -version '0.13.5' +version '0.13.6' shared_scripts { '@ox_lib/init.lua', diff --git a/lib/logs/server/logs.lua b/lib/logs/server/logs.lua index 9d66c94..0ea2827 100644 --- a/lib/logs/server/logs.lua +++ b/lib/logs/server/logs.lua @@ -74,11 +74,11 @@ local logHandlers = { end, qb = function(message) - TriggerEvent('qb-log:server:CreateLog', GetCurrentResourceName(), GetInvokingResource(), 'green', message, false) + TriggerEvent('qb-log:server:CreateLog', GetCurrentResourceName(), GetInvokingResource() or GetCurrentResourceName(), 'green', message, false) end, ox_lib = function(message) - lib.logger(GetInvokingResource(), GetCurrentResourceName(), message) + lib.logger(GetInvokingResource() or GetCurrentResourceName(), GetCurrentResourceName(), message) end, ['built-in'] = function(message) diff --git a/lib/utility/client/utility.lua b/lib/utility/client/utility.lua index f20efcf..0815ab6 100644 --- a/lib/utility/client/utility.lua +++ b/lib/utility/client/utility.lua @@ -452,22 +452,22 @@ end -- Deprecated point functions (no changes) 12/14/25 function Utility.RegisterPoint(pointID, pointCoords, pointDistance, _onEnter, _onExit) - print("^6 community_bridge ^: ^3Utility.RegisterPoint is deprecated. Please use Point.Register instead. ^0") + --print("^6 community_bridge ^: ^3Utility.RegisterPoint is deprecated. Please use Point.Register instead. ^0") return Point.Register(pointID, pointCoords, pointDistance, nil, _onEnter, _onExit) end function Utility.GetPointById(pointID) - print("^6 community_bridge ^: ^3Utility.GetPointById is deprecated. Please use Point.Get instead. ^0") + --print("^6 community_bridge ^: ^3Utility.GetPointById is deprecated. Please use Point.Get instead. ^0") return Point.Get(pointID) end function Utility.GetActivePoints() - print("^6 community_bridge ^: ^3Utility.GetActivePoints is deprecated. Please use Point.GetAll instead. ^0") + --print("^6 community_bridge ^: ^3Utility.GetActivePoints is deprecated. Please use Point.GetAll instead. ^0") return Point.GetAll() end function Utility.RemovePoint(pointID) - print("^6 community_bridge ^: ^3Utility.RemovePoint is deprecated. Please use Point.Remove instead. ^0") + --print("^6 community_bridge ^: ^3Utility.RemovePoint is deprecated. Please use Point.Remove instead. ^0") return Point.Remove(pointID) end diff --git a/modules/inventory/one_inventory/server.lua b/modules/inventory/one_inventory/server.lua index 819ef75..40410b9 100644 --- a/modules/inventory/one_inventory/server.lua +++ b/modules/inventory/one_inventory/server.lua @@ -92,7 +92,6 @@ end ---@return table {weight, name, metadata, slot, label, count} Inventory.GetItemBySlot = function(src, slot) local slotData = inv:GetSlot(src, slot) - print("GetItemBySlot".. json.encode(slotData), {indent = true}) if not slotData then return {} end return { name = slotData.name, @@ -244,4 +243,4 @@ Inventory.OpenPlayerInventory = function(src, target) inv:OpenInventory(src, "player:", target) end -return Inventory \ No newline at end of file +return Inventory diff --git a/modules/target/ox_target/client.lua b/modules/target/ox_target/client.lua index 04100bf..3c1beb5 100644 --- a/modules/target/ox_target/client.lua +++ b/modules/target/ox_target/client.lua @@ -22,7 +22,7 @@ end function Target.FixOptions(options) for _, v in pairs(options) do local action = v.onSelect or v.action - if not action then + if not action then local _type = v.type if _type and _type == "server" then v.serverEvent = v.event @@ -104,7 +104,7 @@ end function Target.AddLocalEntity(entities, options) options = Target.FixOptions(options) ox_target:addLocalEntity(entities, options) - local resource = GetInvokingResource() + local resource = GetInvokingResource() or GetCurrentResourceName() resourceTargets.entities[resource] = resourceTargets.entities[resource] or {} table.insert(resourceTargets.entities[resource], { entities = entities}) end @@ -122,7 +122,7 @@ end function Target.AddNetworkedEntity(netids, options) options = Target.FixOptions(options) ox_target:addEntity(netids, options) - local resource = GetInvokingResource() + local resource = GetInvokingResource() or GetCurrentResourceName() resourceTargets.networkedEntities[resource] = resourceTargets.networkedEntities[resource] or {} table.insert(resourceTargets.networkedEntities[resource], { netids = netids}) end @@ -140,7 +140,7 @@ end function Target.AddModel(models, options) options = Target.FixOptions(options) ox_target:addModel(models, options) - local resource = GetInvokingResource() + local resource = GetInvokingResource() or GetCurrentResourceName() resourceTargets.models[resource] = resourceTargets.models[resource] or {} table.insert(resourceTargets.models[resource], { models = models}) end @@ -167,7 +167,7 @@ function Target.AddBoxZone(name, coords, size, heading, options, debug) debug = debug or targetDebug, options = options, }) - table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() }) + table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() or GetCurrentResourceName() }) return target end @@ -185,7 +185,7 @@ function Target.AddSphereZone(name, coords, radius, options, debug) debug = targetDebug or debug, options = options }) - table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() }) + table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() or GetCurrentResourceName() }) return target end @@ -216,7 +216,7 @@ AddEventHandler('onResourceStop', function(resource) end resourceTargets.entities[resource] = nil if resourceTargets.networkedEntities[resource] and #resourceTargets.networkedEntities[resource] > 0 then - for _, data in pairs(resourceTargets.networkedEntities[resource]) do + for _, data in pairs(resourceTargets.networkedEntities[resource]) do Target.RemoveNetworkedEntity(data.netids) end end diff --git a/modules/target/qb-target/client.lua b/modules/target/qb-target/client.lua index 77dea11..576ffde 100644 --- a/modules/target/qb-target/client.lua +++ b/modules/target/qb-target/client.lua @@ -182,7 +182,7 @@ function Target.AddBoxZone(name, coords, size, heading, options, debug) options = options, distance = getLargestDistance(options), }) - table.insert(targetZones, { name = name, creator = GetInvokingResource() }) + table.insert(targetZones, { name = name, creator = GetInvokingResource() or GetCurrentResourceName() }) return name end @@ -200,7 +200,7 @@ function Target.AddSphereZone(name, coords, radius, options, debug) options = options, distance = getLargestDistance(options), }) - table.insert(targetZones, { name = name, creator = GetInvokingResource() }) + table.insert(targetZones, { name = name, creator = GetInvokingResource() or GetCurrentResourceName() }) return name end diff --git a/modules/target/sleepless_interact/client.lua b/modules/target/sleepless_interact/client.lua index f2cb8e5..2d2f318 100644 --- a/modules/target/sleepless_interact/client.lua +++ b/modules/target/sleepless_interact/client.lua @@ -27,8 +27,8 @@ function Target.FixOptions(options) end options[k].onSelect = select options[k].groups = v.job or v.groups - local optionsCanInteract = v.canInteract - if optionsCanInteract then + local optionsCanInteract = v.canInteract + if optionsCanInteract then local id = Target.CreateCanInteract(optionsCanInteract) v.canInteract = function(...) return Target.CanInteract(id, ...) @@ -142,7 +142,7 @@ function Target.AddBoxZone(name, coords, size, heading, options) coords = coords, options = options, }) - table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() }) + table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() or GetCurrentResourceName() }) return target end @@ -160,7 +160,7 @@ function Target.AddSphereZone(name, coords, radius, options, debug) debug = targetDebug or debug, options = options }) - table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() }) + table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() or GetCurrentResourceName() }) return target end