From 715601f6941a193f629496ad391c61e50a97ec7d Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Date: Sun, 15 May 2022 12:17:41 +0530 Subject: [PATCH] Added footstep sounds to auto walk --- stardew-access/Features/TileViewer.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stardew-access/Features/TileViewer.cs b/stardew-access/Features/TileViewer.cs index c63e0cd..64c56e4 100644 --- a/stardew-access/Features/TileViewer.cs +++ b/stardew-access/Features/TileViewer.cs @@ -21,6 +21,7 @@ namespace stardew_access.Features private Boolean relativeOffsetLock = false; private Vector2 prevPlayerPosition = Vector2.Zero, prevFacing = Vector2.Zero; private Vector2 finalTile = Vector2.Zero; + private Vector2 prevTile = Vector2.Zero; public Boolean isAutoWalking = false; @@ -240,6 +241,12 @@ namespace stardew_access.Features if (this.isAutoWalking) { + if (Vector2.Distance(this.prevTile, CurrentPlayer.Position) >= 2f) + { + prevTile = CurrentPlayer.Position; + Game1.player.checkForFootstep(); + } + if (this.finalTile != Vector2.Zero && this.finalTile == CurrentPlayer.Position) { MainClass.ScreenReader.Say("Reached destination", true);