mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
Compare commits
3 Commits
69d0f07bb6
...
54b1280bef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54b1280bef | ||
|
|
3ac65d4630 | ||
|
|
ed49876c69 |
@@ -2688,6 +2688,13 @@ function registerShop(name, label, items, society, coords)
|
|||||||
shopExploitCheck = shopExploitCheck or {}
|
shopExploitCheck = shopExploitCheck or {}
|
||||||
shopExploitCheck[name] = shopExploitCheck[name] or {}
|
shopExploitCheck[name] = shopExploitCheck[name] or {}
|
||||||
|
|
||||||
|
if isStarted("jim-shops") then
|
||||||
|
-- Add support for new jim-shops registration export
|
||||||
|
if checkExportExists("jim-shops", "registerShop") then
|
||||||
|
exports["jim-shops"]:registerShop(name, label, items, society, coords)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
for i = 1, #InvFunc do
|
for i = 1, #InvFunc do
|
||||||
local inv = InvFunc[i]
|
local inv = InvFunc[i]
|
||||||
if isStarted(inv.invName) then
|
if isStarted(inv.invName) then
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ local targetFunc = {
|
|||||||
canInteract = opts[i].canInteract or nil,
|
canInteract = opts[i].canInteract or nil,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
exports[OXTargetExport]:addLocalEntity(entity, options)
|
return exports[OXTargetExport]:addLocalEntity(entity, options)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
boxTarget =
|
boxTarget =
|
||||||
@@ -105,7 +105,7 @@ local targetFunc = {
|
|||||||
canInteract = opts[i].canInteract or nil,
|
canInteract = opts[i].canInteract or nil,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
exports[OXTargetExport]:addModel(models, options)
|
return exports[OXTargetExport]:addModel(models, options)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
removeTargetEntity =
|
removeTargetEntity =
|
||||||
@@ -128,7 +128,7 @@ local targetFunc = {
|
|||||||
entityTarget =
|
entityTarget =
|
||||||
function(entity, opts, dist)
|
function(entity, opts, dist)
|
||||||
local options = { options = opts, distance = dist }
|
local options = { options = opts, distance = dist }
|
||||||
exports[QBTargetExport]:AddTargetEntity(entity, options)
|
return exports[QBTargetExport]:AddTargetEntity(entity, options)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
boxTarget =
|
boxTarget =
|
||||||
@@ -148,7 +148,7 @@ local targetFunc = {
|
|||||||
modelTarget =
|
modelTarget =
|
||||||
function(models, opts, dist)
|
function(models, opts, dist)
|
||||||
local options = { options = opts, distance = dist }
|
local options = { options = opts, distance = dist }
|
||||||
exports[QBTargetExport]:AddTargetModel(models, options)
|
return exports[QBTargetExport]:AddTargetModel(models, options)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
removeTargetEntity =
|
removeTargetEntity =
|
||||||
@@ -213,11 +213,10 @@ local targetFunc = {
|
|||||||
|
|
||||||
|
|
||||||
-- Tables for storing created targets for the fallback system and zone management.
|
-- Tables for storing created targets for the fallback system and zone management.
|
||||||
local TextTargets = {} -- For fallback DrawText3D targets.
|
|
||||||
local targetEntities = {} -- For entity targets.
|
local targetEntities = {} -- For entity targets.
|
||||||
local boxTargets = {} -- For box-shaped zone targets.
|
local boxTargets = {} -- For box-shaped zone targets.
|
||||||
local circleTargets = {} -- For circular zone targets.
|
local circleTargets = {} -- For circular zone targets.
|
||||||
|
local modelTargets = {}
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
-- Entity Target Creation
|
-- Entity Target Creation
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
@@ -442,7 +441,7 @@ function createModelTarget(models, opts, dist)
|
|||||||
if isStarted(script.targetName) then
|
if isStarted(script.targetName) then
|
||||||
debugPrint("^6Bridge^7: ^2Creating new ^3Model ^2target with ^6"..script.targetName.."^7")
|
debugPrint("^6Bridge^7: ^2Creating new ^3Model ^2target with ^6"..script.targetName.."^7")
|
||||||
local target = script.modelTarget(models, opts, dist)
|
local target = script.modelTarget(models, opts, dist)
|
||||||
circleTargets[#circleTargets + 1] = target
|
modelTargets[#modelTargets + 1] = target
|
||||||
return target
|
return target
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -553,7 +552,7 @@ local function CleanupTargets()
|
|||||||
if isStarted(OXTargetExport) then
|
if isStarted(OXTargetExport) then
|
||||||
exports[OXTargetExport]:removeZone(boxTargets[i], true)
|
exports[OXTargetExport]:removeZone(boxTargets[i], true)
|
||||||
elseif isStarted(QBTargetExport) then
|
elseif isStarted(QBTargetExport) then
|
||||||
exports[QBTargetExport]:RemoveZone(boxTargets[i].name)
|
exports[QBTargetExport]:RemoveZone(boxTargets[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Remove circle zone targets.
|
-- Remove circle zone targets.
|
||||||
@@ -561,7 +560,7 @@ local function CleanupTargets()
|
|||||||
if isStarted(OXTargetExport) then
|
if isStarted(OXTargetExport) then
|
||||||
exports[OXTargetExport]:removeZone(circleTargets[i], true)
|
exports[OXTargetExport]:removeZone(circleTargets[i], true)
|
||||||
elseif isStarted(QBTargetExport) then
|
elseif isStarted(QBTargetExport) then
|
||||||
exports[QBTargetExport]:RemoveZone(circleTargets[i].name)
|
exports[QBTargetExport]:RemoveZone(circleTargets[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user