Added option to allow tile cursor to view the entire map regardless if it is visible or not.
parent
955ffac65b
commit
7a1b768bdb
|
@ -6,7 +6,6 @@ using StardewValley;
|
|||
using StardewValley.Menus;
|
||||
using stardew_access.Features;
|
||||
|
||||
|
||||
namespace stardew_access.Features
|
||||
{
|
||||
public class MouseHandler
|
||||
|
@ -137,13 +136,13 @@ namespace stardew_access.Features
|
|||
private bool tryMoveTileView(Vector2 delta)
|
||||
{
|
||||
Vector2 dest = this.getTileCursorPosition() + delta;
|
||||
if (Utility.isOnScreen(dest, 0))
|
||||
if (!isPositionOnMap(dest)) return false;
|
||||
if ((MainClass.Config.LimitTileCursorToScreen && Utility.isOnScreen(dest, 0)) || !MainClass.Config.LimitTileCursorToScreen)
|
||||
{
|
||||
if (this.relativeOffsetLock)
|
||||
this.relativeOffsetLockPosition += delta;
|
||||
else
|
||||
this.ViewingOffset += delta;
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -180,5 +179,13 @@ namespace stardew_access.Features
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool isPositionOnMap(Vector2 position)
|
||||
{
|
||||
Map map = Game1.currentLocation.map;
|
||||
if (position.X < 0 || position.X > map.Layers[0].DisplayWidth) return false;
|
||||
if (position.Y < 0 || position.Y > map.Layers[0].DisplayHeight) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace stardew_access
|
|||
public KeybindList TimeNSeasonKey { get; set; } = KeybindList.Parse("Q");
|
||||
public KeybindList ReadTileKey { get; set; } = KeybindList.Parse("J");
|
||||
public KeybindList ReadStandingTileKey { get; set; } = KeybindList.Parse("LeftAlt + J");
|
||||
public bool LimitTileCursorToScreen { get; set; } = false;
|
||||
public int TileCursorPreciseMovementDistance { get; set; } = 8;
|
||||
|
||||
//Tile viewer keys
|
||||
|
|
Loading…
Reference in New Issue