Added command to enable/diable read tile feature

master
shoaib11120 2021-12-15 19:30:25 +05:30
parent 222a679a03
commit 2dc1b81480
1 changed files with 6 additions and 2 deletions

View File

@ -16,7 +16,7 @@ namespace stardew_access
public class MainClass : Mod
{
private Harmony? harmony;
private static bool isReadingTile = false;
private static bool isReadingTile = false, readTile = false;
private static Vector2 prevTile;
public static IMonitor? monitor;
AutoHotkeyEngine ahk;
@ -106,6 +106,10 @@ namespace stardew_access
#endregion
helper.ConsoleCommands.Add("read_tile", "Toggle read tile feature", (string arg1, string[] arg2) => {
readTile = !readTile;
});
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
helper.Events.GameLoop.UpdateTicked += this.onUpdateTicked;
}
@ -117,7 +121,7 @@ namespace stardew_access
MenuPatch.resetGlobalVars();
if(!isReadingTile)
if(!isReadingTile && readTile)
ReadTile();
}