put unit test inside debug level 1
This commit is contained in:
1 parent
b75ab8479b
commit
bb7549b988
1 file changed
+12
-12
@@ -89,7 +89,16 @@ function Dialogue.OpenDialogue( name, dialogue, characterOptions, dialogueOption
|
|||||||
promises[name] = wrappedFunction
|
promises[name] = wrappedFunction
|
||||||
end
|
end
|
||||||
|
|
||||||
RegisterCommand("dialogue", function()
|
|
||||||
|
RegisterNuiCallback("dialogue:SelectOption", function(data)
|
||||||
|
local promis = promises[data.name]
|
||||||
|
if not promis then return end
|
||||||
|
promis(data.id)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Debug command
|
||||||
|
if BridgeSharedConfig.DebugLevel >= 1 then
|
||||||
|
RegisterCommand("dialogue", function()
|
||||||
local pos = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0, 2.0, 0)
|
local pos = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0, 2.0, 0)
|
||||||
local timeout = 500
|
local timeout = 500
|
||||||
local model = `a_f_y_hipster_01`
|
local model = `a_f_y_hipster_01`
|
||||||
@@ -144,14 +153,5 @@ RegisterCommand("dialogue", function()
|
|||||||
DeleteEntity(ped)
|
DeleteEntity(ped)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
RegisterNuiCallback("dialogue:SelectOption", function(data)
|
|
||||||
local promis = promises[data.name]
|
|
||||||
if not promis then return end
|
|
||||||
promis(data.id)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- { label: 'Hello there! this is some long text that i am Dialogueing', id: '1' },
|
|
||||||
-- { label: 'Trade with me', id: '2' },
|
|
||||||
-- { label: 'Goodbye', id: '3' }
|
|
||||||
Reference in new issue
Block a user