Added command to exclude a key from exclusions

master
shoaib11120 2022-01-19 12:59:29 +05:30
parent 469ed0a6a6
commit 222385daf9
1 changed files with 26 additions and 1 deletions

View File

@ -243,7 +243,7 @@ namespace stardew_access
monitor.Log("Radar " + (snapMouse ? "on" : "off"), LogLevel.Info);
});
helper.ConsoleCommands.Add("r_in", "Include an object to radar", (string commmand, string[] args) =>
helper.ConsoleCommands.Add("r_ex", "Exclude an object key to radar", (string commmand, string[] args) =>
{
string? keyToAdd = null;
@ -261,6 +261,31 @@ namespace stardew_access
}
});
helper.ConsoleCommands.Add("r_in", "Inlcude an object key to radar", (string commmand, string[] args) =>
{
string? keyToAdd = null;
for (int i = 0; i < args.Count(); i++) { keyToAdd += " " + args[i]; }
if (keyToAdd != null)
{
keyToAdd = keyToAdd.Trim().ToLower();
if (radarFeature.exclusions.Contains(keyToAdd))
{
radarFeature.exclusions.Remove(keyToAdd);
monitor.Log($"Removed {keyToAdd} key from exclusions.", LogLevel.Info);
}
else
{
monitor.Log($"Cannot find{keyToAdd} key in exclusions.", LogLevel.Info);
}
}
else
{
monitor.Log("Unable to remove the key from exclusions.", LogLevel.Info);
}
});
helper.ConsoleCommands.Add("ref_sr", "Refresh screen reader", (string commmand, string[] args) =>
{
ScreenReader.initializeScreenReader();