fix: restore modules.game_interface.lastManualWalk for game_bot (#1757)

This commit is contained in:
Kizuno18 2026-07-18 16:44:43 -03:00 committed by GitHub
parent dedc7378e8
commit cee2851016
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -19,6 +19,10 @@ countWindow = nil
logoutWindow = nil
exitWindow = nil
bottomSplitter = nil
-- timestamp of the last manual keyboard walk, refreshed by game_walk and read
-- by consumers (e.g. game_bot) to pause automation while the player walks;
-- defined here so it is always present whenever this module is loaded
lastManualWalk = 0
limitedZoom = false
currentViewMode = 0
leftIncreaseSidePanels = nil

View file

@ -120,6 +120,7 @@ local function walk(dir)
end
end
modules.game_interface.lastManualWalk = g_clock.millis()
g_game.walk(dir)
return true
end