Refactored entity behavior triggers to simplify argument passing and added OnSet handler for particle behaviors. Improved particle effect management and event handling, updated locale and lib initialization in several modules, and fixed skill metadata access. Also streamlined point zone logic and menu/zone system initialization for better reliability.
32 lines
941 B
Lua
32 lines
941 B
Lua
---@diagnostic disable: duplicate-set-field
|
|
local resourceName = "ox_lib"
|
|
local configValue = BridgeClientConfig.InputSystem
|
|
if (configValue == "auto" and GetResourceState(resourceName) == "missing") or (configValue ~= "auto" and configValue ~= resourceName) then return end
|
|
|
|
Input = {}
|
|
|
|
if not lib then Require('init.lua', 'ox_lib') end
|
|
|
|
function Input.Open(title, data, isQBFormat, submitText)
|
|
local inputs = data.inputs
|
|
if isQBFormat then
|
|
local convertedData = {}
|
|
local returnData = lib.inputDialog(title, QBToOxInput(inputs))
|
|
for i, v in pairs(inputs) do
|
|
for k, j in pairs(returnData or {}) do
|
|
if k == v.name then
|
|
convertedData[v.name] = j
|
|
end
|
|
end
|
|
end
|
|
return convertedData
|
|
else
|
|
return lib.inputDialog(title, data)
|
|
end
|
|
end
|
|
|
|
function Input.GetResourceName()
|
|
return resourceName
|
|
end
|
|
|
|
return Input |