Version 2.2.1 - updated market, text editor, bot

This commit is contained in:
OTCv8
2020-04-02 06:47:02 +02:00
parent 932165111d
commit ed8162a9d5
20 changed files with 263 additions and 163 deletions

View File

@@ -366,7 +366,8 @@ function initCallbacks()
onAppear = botCreatureAppear,
onDisappear = botCreatureDisappear,
onPositionChange = botCreaturePositionChange,
onHealthPercentChange = botCraetureHealthPercentChange
onHealthPercentChange = botCraetureHealthPercentChange,
onTurn = botCreatureTurn
})
connect(LocalPlayer, {
@@ -414,7 +415,8 @@ function terminateCallbacks()
onAppear = botCreatureAppear,
onDisappear = botCreatureDisappear,
onPositionChange = botCreaturePositionChange,
onHealthPercentChange = botCraetureHealthPercentChange
onHealthPercentChange = botCraetureHealthPercentChange,
onTurn = botCreatureTurn
})
disconnect(LocalPlayer, {
@@ -559,3 +561,8 @@ function botChannelEvent(channelId, name, event)
if botExecutor == nil then return false end
safeBotCall(function() botExecutor.callbacks.onChannelEvent(channelId, name, event) end)
end
function botCreatureTurn(creature, direction)
if botExecutor == nil then return false end
safeBotCall(function() botExecutor.callbacks.onTurn(creature, direction) end)
end