Added command to toggle warnings feature
parent
6d18849f17
commit
d14af408df
|
@ -15,21 +15,14 @@ namespace stardew_access
|
|||
if (helper == null)
|
||||
return;
|
||||
|
||||
#region Read Tile
|
||||
helper.ConsoleCommands.Add("readtile", "Toggle read tile feature.", (string commmand, string[] args) =>
|
||||
{
|
||||
MainClass.Config.ReadTile = !MainClass.Config.ReadTile;
|
||||
helper.WriteConfig(MainClass.Config);
|
||||
{
|
||||
MainClass.Config.ReadTile = !MainClass.Config.ReadTile;
|
||||
helper.WriteConfig(MainClass.Config);
|
||||
|
||||
MainClass.DebugLog("Read Tile is " + (MainClass.Config.ReadTile ? "on" : "off"));
|
||||
});
|
||||
|
||||
helper.ConsoleCommands.Add("snapmouse", "Toggle snap mouse feature.", (string commmand, string[] args) =>
|
||||
{
|
||||
MainClass.Config.SnapMouse = !MainClass.Config.SnapMouse;
|
||||
helper.WriteConfig(MainClass.Config);
|
||||
|
||||
MainClass.DebugLog("Snap Mouse is " + (MainClass.Config.SnapMouse ? "on" : "off"));
|
||||
});
|
||||
MainClass.DebugLog("Read Tile is " + (MainClass.Config.ReadTile ? "on" : "off"));
|
||||
});
|
||||
|
||||
helper.ConsoleCommands.Add("flooring", "Toggle flooring in read tile.", (string commmand, string[] args) =>
|
||||
{
|
||||
|
@ -46,6 +39,7 @@ namespace stardew_access
|
|||
|
||||
MainClass.DebugLog("Watered toggle is " + (MainClass.Config.WateredToggle ? "on" : "off"));
|
||||
});
|
||||
#endregion
|
||||
|
||||
#region Radar Feature
|
||||
helper.ConsoleCommands.Add("radar", "Toggle radar feature.", (string commmand, string[] args) =>
|
||||
|
@ -482,12 +476,13 @@ namespace stardew_access
|
|||
});
|
||||
#endregion
|
||||
|
||||
#region Other
|
||||
helper.ConsoleCommands.Add("refsr", "Refresh screen reader", (string commmand, string[] args) =>
|
||||
{
|
||||
MainClass.ScreenReader.InitializeScreenReader();
|
||||
{
|
||||
MainClass.ScreenReader.InitializeScreenReader();
|
||||
|
||||
MainClass.DebugLog("Screen Reader refreshed!");
|
||||
});
|
||||
MainClass.DebugLog("Screen Reader refreshed!");
|
||||
});
|
||||
|
||||
helper.ConsoleCommands.Add("refmc", "Refresh mod config", (string commmand, string[] args) =>
|
||||
{
|
||||
|
@ -510,6 +505,23 @@ namespace stardew_access
|
|||
|
||||
MainClass.DebugLog("Speaking in percentage is " + (MainClass.Config.HealthNStaminaInPercentage ? "on" : "off"));
|
||||
});
|
||||
|
||||
helper.ConsoleCommands.Add("snapmouse", "Toggle snap mouse feature.", (string commmand, string[] args) =>
|
||||
{
|
||||
MainClass.Config.SnapMouse = !MainClass.Config.SnapMouse;
|
||||
helper.WriteConfig(MainClass.Config);
|
||||
|
||||
MainClass.DebugLog("Snap Mouse is " + (MainClass.Config.SnapMouse ? "on" : "off"));
|
||||
});
|
||||
|
||||
helper.ConsoleCommands.Add("warning", "Toggle warnings feature.", (string commmand, string[] args) =>
|
||||
{
|
||||
MainClass.Config.Warning = !MainClass.Config.Warning;
|
||||
helper.WriteConfig(MainClass.Config);
|
||||
|
||||
MainClass.DebugLog("Warnings is " + (MainClass.Config.Warning ? "on" : "off"));
|
||||
});
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,9 +28,6 @@ namespace stardew_access.Features
|
|||
if (this.shouldPause)
|
||||
return;
|
||||
|
||||
if (!MainClass.Config.ReadTile)
|
||||
return;
|
||||
|
||||
this.isBusy = true;
|
||||
this.run();
|
||||
Task.Delay(delay).ContinueWith(_ => { this.isBusy = false; });
|
||||
|
|
|
@ -77,6 +77,7 @@ namespace stardew_access
|
|||
public KeybindList TimeNSeasonKey { get; set; } = KeybindList.Parse("Q"); // Narrate the time of day, day and date and season
|
||||
public Boolean VerboseCoordinates { get; set; } = true;
|
||||
public Boolean SnapMouse { get; set; } = true; // Toggles the snap mouse feature
|
||||
public Boolean Warning { get; set; } = true; // Toggles the warnings feature
|
||||
// TODO add command to toggle warning feature
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -168,9 +168,11 @@ namespace stardew_access
|
|||
//handle TileCursor update logic
|
||||
TileViewerFeature.update();
|
||||
|
||||
WarningsFeature.update();
|
||||
if (Config.Warning)
|
||||
WarningsFeature.update();
|
||||
|
||||
ReadTileFeature.update();
|
||||
if (Config.ReadTile)
|
||||
ReadTileFeature.update();
|
||||
|
||||
if (!RadarFeature.isRunning && Config.Radar)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue