Added focus mode to radar feature
parent
c5e72d545b
commit
590fe5288f
|
@ -223,14 +223,18 @@ namespace stardew_access.Game
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playSoundAt(Vector2 position, String? searchQuery, Type soundType)
|
public void playSoundAt(Vector2 position, String searchQuery, Type soundType)
|
||||||
{
|
{
|
||||||
// Skip if player is directly looking at the tile
|
// Skip if player is directly looking at the tile
|
||||||
if (CurrentPlayer.getNextTile().Equals(position))
|
if (CurrentPlayer.getNextTile().Equals(position))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (searchQuery == null || !exclusions.Contains(searchQuery.ToLower().Trim()))
|
if (!radarFocus && exclusions.Contains(searchQuery.ToLower().Trim()))
|
||||||
{
|
return;
|
||||||
|
|
||||||
|
if (radarFocus && !focus.Contains(searchQuery.ToLower().Trim()))
|
||||||
|
return;
|
||||||
|
|
||||||
if (MainClass.radarDebug)
|
if (MainClass.radarDebug)
|
||||||
MainClass.monitor.Log($"Object:{searchQuery.ToLower().Trim()}\tPosition: X={position.X} Y={position.Y}", StardewModdingAPI.LogLevel.Debug);
|
MainClass.monitor.Log($"Object:{searchQuery.ToLower().Trim()}\tPosition: X={position.X} Y={position.Y}", StardewModdingAPI.LogLevel.Debug);
|
||||||
|
|
||||||
|
@ -259,7 +263,7 @@ namespace stardew_access.Game
|
||||||
{
|
{
|
||||||
Game1.currentLocation.localSoundAt(getSoundName(soundType, "bottom"), position);
|
Game1.currentLocation.localSoundAt(getSoundName(soundType, "bottom"), position);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string getSoundName(Type soundType, string post)
|
public string getSoundName(Type soundType, string post)
|
||||||
|
@ -329,13 +333,13 @@ namespace stardew_access.Game
|
||||||
|
|
||||||
public void enableFocus()
|
public void enableFocus()
|
||||||
{
|
{
|
||||||
temp_exclusions = exclusions;
|
temp_exclusions = exclusions.ToList();
|
||||||
exclusions.Clear();
|
exclusions.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disableFocus()
|
public void disableFocus()
|
||||||
{
|
{
|
||||||
exclusions = temp_exclusions;
|
exclusions = temp_exclusions.ToList();
|
||||||
temp_exclusions.Clear();
|
temp_exclusions.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue