Merge branch 'dev' of https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge into dev
This commit is contained in:
commit
2436b9d9aa
6 files changed
+84
-4
No files matched your search
@@ -104,7 +104,7 @@ if IsDuplicityVersion() then return end
|
||||
|
||||
Bridge.RegisterModule("Fuel", Fuel)
|
||||
Bridge.RegisterModule("Input", Input)
|
||||
Bridge.RegisterModule("Progressbar", Progressbar)
|
||||
Bridge.RegisterModule("ProgressBar", ProgressBar)
|
||||
|
||||
Bridge.RegisterModule("Target", Target)
|
||||
Bridge.RegisterModule("Menu", Menu)
|
||||
|
||||
@@ -90,7 +90,7 @@ if not isServer then goto client end
|
||||
function ReboundEntities.Create(entityData, src)
|
||||
local entity = ReboundEntities.Register(entityData)
|
||||
assert(entity and entity.position, "Invalid entity data")
|
||||
entity.rotation = entity.rotation or vector3(0, 0, 0)
|
||||
entity.rotation = entity.rotation or vector3(0, 0, entityData.heading or 0)
|
||||
TriggerClientEvent(GetCurrentResourceName() .. ":client:CreateReboundEntity", src or -1, entity)
|
||||
return entity
|
||||
end
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
Target = Target or {}
|
||||
|
||||
local function warnUser()
|
||||
print("Currently Only Targeting Is Supported.")
|
||||
end
|
||||
|
||||
Target.AddGlobalPlayer = function(options)
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.AddGlobalVehicle = function(options)
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.RemoveGlobalVehicle = function(options)
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.AddLocalEntity = function(entities, _options)
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.AddModel = function(models, options)
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.AddBoxZone = function(name, coords, size, heading, options)
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.RemoveGlobalPlayer = function()
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.RemoveLocalEntity = function(entity)
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.RemoveModel = function(model)
|
||||
warnUser()
|
||||
end
|
||||
|
||||
Target.RemoveZone = function(name)
|
||||
warnUser()
|
||||
end
|
||||
@@ -12,7 +12,7 @@ detectDebugEnabled()
|
||||
local ox_target = exports.ox_target
|
||||
local targetZones = {}
|
||||
|
||||
Target = {}
|
||||
Target = Target or {}
|
||||
|
||||
Target.FixOptions = function(options)
|
||||
for k, v in pairs(options) do
|
||||
|
||||
@@ -11,7 +11,7 @@ detectDebugEnabled()
|
||||
|
||||
local targetZones = {}
|
||||
|
||||
Target = {}
|
||||
Target = Target or {}
|
||||
|
||||
Target.FixOptions = function(options)
|
||||
for k, v in pairs(options) do
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
if GetResourceState('sleepless_interact') ~= 'started' then return end
|
||||
|
||||
local sleepless = exports.sleepless_interact
|
||||
|
||||
Target = Target or {}
|
||||
|
||||
Target.FixOptions = function(options)
|
||||
for k, v in pairs(options) do
|
||||
local action = v.onSelect or v.action
|
||||
local select = function(entityOrData)
|
||||
if type(entityOrData) == 'table' then
|
||||
return action(entityOrData.entity)
|
||||
end
|
||||
return action(entityOrData)
|
||||
end
|
||||
options[k].onSelect = select
|
||||
end
|
||||
return options
|
||||
end
|
||||
|
||||
Target.AddLocalEntity = function(entity, _options)
|
||||
local options = Target.FixOptions(_options)
|
||||
sleepless:addLocalEntity({
|
||||
id = entity,
|
||||
entity = entity,
|
||||
options = options,
|
||||
renderDistance = 10.0,
|
||||
activeDistance = 2.0,
|
||||
cooldown = 1500
|
||||
})
|
||||
end
|
||||
|
||||
Target.RemoveLocalEntity = function(entity)
|
||||
sleepless:removeLocalEntity(entity)
|
||||
end
|
||||
Reference in new issue
Block a user