Version 0.998 BETA, mostly bug fixes

This commit is contained in:
OTCv8
2019-10-26 17:38:55 +02:00
parent 46e615596a
commit 95f7b39a10
11 changed files with 21 additions and 10 deletions

View File

@@ -8,7 +8,6 @@ configEditorText = nil
configList = nil
botPanel = nil
local botMessages = nil
local showingDocumentation = false
local configCopy = ""
local enableButton = nil
local executeEvent = nil
@@ -144,6 +143,16 @@ function online()
end
end
function offline()
botButton:hide()
configWindow:hide()
clearConfig()
removeEvent(executeEvent)
removeEvent(checkMsgsEvent)
executeEvent = nil
checkMsgsEvent = nil
end
function toggleBot()
botConfig.enabled = not botConfig.enabled
if botConfig.enabled then
@@ -176,7 +185,6 @@ function editConfig()
configEditorText:setEditable(true)
activeTab = mainTab
configTab:selectTab(mainTab)
showingDocumentation = false
end
local function split2(str, delimiter)

View File

@@ -9,7 +9,7 @@ ConfigTabBarPanel < MoveableTabBarPanel
MainWindow
id: configWindow
size: 650 500
size: 650 497
!text: tr("Config editor")
Label

View File

@@ -25,9 +25,6 @@ macro(5000, "macro send link", "f5", function()
end)
macro(1000, "flag tiles", function()
local staticText = StaticText.create()
staticText:addMessage("t", 9, "xDDD")
local tile = player:getTile()
tile:setText("Hello =)", "red")
end)

View File

@@ -155,6 +155,7 @@ function executeBot(config, storage, panel, msgCallback)
hotkey = hotkey,
switch = switch
})
return context._macros[#context._macros]
end
-- hotkey(keys, callback)
@@ -184,6 +185,7 @@ function executeBot(config, storage, panel, msgCallback)
switch = switch,
single = false
}
return context._hotkeys[keys]
end
-- singlehotkey(keys, callback)
@@ -213,6 +215,7 @@ function executeBot(config, storage, panel, msgCallback)
switch = switch,
single = true
}
return context._hotkeys[keys]
end
-- schedule(timeout, callback)
@@ -283,7 +286,7 @@ function executeBot(config, storage, panel, msgCallback)
end)
end
-- delay(duration)
-- delay(duration) -- block execution of current macro/hotkey/callback for x milliseconds
context.delay = function(duration)
if not context._currentExecution then
return context.error("Invalid usage of delay function, it should be used inside callbacks")