Version 1.3 - auto reconnect, better bot (with sound), animated mounts, bug fixes

This commit is contained in:
OTCv8
2019-11-11 17:10:03 +01:00
parent d78af570ea
commit 1072671986
48 changed files with 458 additions and 154 deletions

View File

@@ -269,7 +269,7 @@ Panel
ui.config:addOption(name)
end
if not context.storage.cavebot.activeConfig and #context.storage.cavebot.configs > 0 then
if (not context.storage.cavebot.activeConfig or context.storage.cavebot.activeConfig == 0) and #context.storage.cavebot.configs > 0 then
context.storage.cavebot.activeConfig = 1
end
@@ -331,10 +331,24 @@ Panel
if not context.storage.cavebot.activeConfig or not context.storage.cavebot.configs[context.storage.cavebot.activeConfig] then
return
end
context.storage.cavebot.enabled = false
table.remove(context.storage.cavebot.configs, context.storage.cavebot.activeConfig)
context.storage.cavebot.activeConfig = 0
refreshConfig()
local questionWindow = nil
local closeWindow = function()
questionWindow:destroy()
end
local removeConfig = function()
closeWindow()
if not context.storage.cavebot.activeConfig or not context.storage.cavebot.configs[context.storage.cavebot.activeConfig] then
return
end
context.storage.cavebot.enabled = false
table.remove(context.storage.cavebot.configs, context.storage.cavebot.activeConfig)
context.storage.cavebot.activeConfig = 0
refreshConfig()
end
questionWindow = context.displayGeneralBox(tr('Remove config'), tr('Do you want to remove current waypoints config?'), {
{ text=tr('Yes'), callback=removeConfig },
{ text=tr('No'), callback=closeWindow },
anchor=AnchorHorizontalCenter}, removeConfig, closeWindow)
end
-- waypoint editor
@@ -733,7 +747,7 @@ Panel
ui.list:focusChild(nextChild)
commandExecutionNo = 0
end
end)
end)
return functions
end