Readded `lessInfo` to many tiles related functions and other code cleanup (making argument ordering consist.
parent
91643e184f
commit
ad0cb687b7
|
@ -205,8 +205,9 @@ namespace stardew_access.Features
|
|||
/// <param name="beach">The Beach to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetBeachInfo(Beach beach, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetBeachInfo(Beach beach, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
if (MainClass.ModHelper == null)
|
||||
{
|
||||
|
@ -237,25 +238,35 @@ namespace stardew_access.Features
|
|||
/// <param name="boatTunnel">The BoatTunnel to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetBoatTunnelInfo(BoatTunnel boatTunnel, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetBoatTunnelInfo(BoatTunnel boatTunnel, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
if (boatTunnel is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(boatTunnel));
|
||||
}
|
||||
// Check if the player has received the specified mail or not
|
||||
bool HasMail(string mail) => Game1.MasterPlayer.hasOrWillReceiveMail(mail);
|
||||
|
||||
if (x == 4 && y == 9)
|
||||
// If the position matches one of the interactable elements in the boat tunnel
|
||||
if ((x, y) == (4, 9) || (x, y) == (6, 8) || (x, y) == (8, 9))
|
||||
{
|
||||
return ((!Game1.MasterPlayer.hasOrWillReceiveMail("willyBoatFixed") ? "Repair " : "") + "Ticket Machine", CATEGORY.Interactables);
|
||||
}
|
||||
else if (x == 6 && y == 8)
|
||||
string mail = (x, y) switch
|
||||
{
|
||||
return ((!Game1.MasterPlayer.hasOrWillReceiveMail("willyBoatHull") ? "Repair " : "") + "Boat Hull", (!Game1.MasterPlayer.hasOrWillReceiveMail("willyBoatHull") ? CATEGORY.Interactables : CATEGORY.Decor));
|
||||
}
|
||||
else if (x == 8 && y == 9)
|
||||
(4, 9) => "willyBoatFixed",
|
||||
(6, 8) => "willyBoatHull",
|
||||
(8, 9) => "willyBoatAnchor",
|
||||
_ => throw new InvalidOperationException("Unexpected (x, y) values"),
|
||||
};
|
||||
|
||||
string itemName = (x, y) switch
|
||||
{
|
||||
return ((!Game1.MasterPlayer.hasOrWillReceiveMail("willyBoatAnchor") ? "Repair " : "") + "Boat Anchor", (!Game1.MasterPlayer.hasOrWillReceiveMail("willyBoatAnchor") ? CATEGORY.Interactables : CATEGORY.Decor));
|
||||
(4, 9) => "Ticket Machine",
|
||||
(6, 8) => "Boat Hull",
|
||||
(8, 9) => "Boat Anchor",
|
||||
_ => throw new InvalidOperationException("Unexpected (x, y) values"),
|
||||
};
|
||||
|
||||
CATEGORY category = (x, y) == (4, 9) ? CATEGORY.Interactables : (!HasMail(mail) ? CATEGORY.Interactables : CATEGORY.Decor);
|
||||
|
||||
return ((!HasMail(mail) ? "Repair " : "") + itemName, category);
|
||||
}
|
||||
|
||||
return (null, null);
|
||||
|
@ -267,8 +278,9 @@ namespace stardew_access.Features
|
|||
/// <param name="communityCenter">The CommunityCenter to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetCommunityCenterInfo(CommunityCenter communityCenter, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetCommunityCenterInfo(CommunityCenter communityCenter, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
if (communityCenter.missedRewardsChestVisible.Value && x == 22 && y == 10)
|
||||
{
|
||||
|
@ -284,8 +296,9 @@ namespace stardew_access.Features
|
|||
/// <param name="building">The Building instance.</param>
|
||||
/// <param name="x">The x-coordinate of the position.</param>
|
||||
/// <param name="y">The y-coordinate of the position.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the door or building found, or (null, null) if no door or building is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetBuildingInfo(Building building, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetBuildingInfo(Building building, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
string name = building.buildingType.Value;
|
||||
int buildingTileX = building.tileX.Value;
|
||||
|
@ -341,8 +354,9 @@ namespace stardew_access.Features
|
|||
/// <param name="farm">The Farm to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetFarmInfo(Farm farm, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetFarmInfo(Farm farm, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
var mainMailboxPos = farm.GetMainMailboxPosition();
|
||||
Building building = farm.getBuildingAt(new Vector2(x, y));
|
||||
|
@ -353,7 +367,7 @@ namespace stardew_access.Features
|
|||
}
|
||||
else if (building is not null) // Check if there is a building at the current position
|
||||
{
|
||||
return GetBuildingInfo(building, x, y);
|
||||
return GetBuildingInfo(building, x, y, lessInfo);
|
||||
}
|
||||
|
||||
return (null, null);
|
||||
|
@ -365,8 +379,9 @@ namespace stardew_access.Features
|
|||
/// <param name="farmHouse">The FarmHouse to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetFarmHouseInfo(FarmHouse farmHouse, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetFarmHouseInfo(FarmHouse farmHouse, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
if (farmHouse.upgradeLevel >= 1)
|
||||
{
|
||||
|
@ -396,8 +411,9 @@ namespace stardew_access.Features
|
|||
/// <param name="forest">The Forest to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetForestInfo(Forest forest, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetForestInfo(Forest forest, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
if (forest.travelingMerchantDay && x == 27 && y == 11)
|
||||
{
|
||||
|
@ -421,8 +437,9 @@ namespace stardew_access.Features
|
|||
/// <param name="islandFarmHouse">The IslandFarmHouse to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetIslandFarmHouseInfo(IslandFarmHouse islandFarmHouse, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetIslandFarmHouseInfo(IslandFarmHouse islandFarmHouse, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
int fridgeX = islandFarmHouse.fridgePosition.X;
|
||||
int fridgeY = islandFarmHouse.fridgePosition.Y;
|
||||
|
@ -448,8 +465,9 @@ namespace stardew_access.Features
|
|||
/// <param name="islandNorth">The IslandNorth to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetIslandNorthInfo(IslandNorth islandNorth, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetIslandNorthInfo(IslandNorth islandNorth, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
// Check if the trader is activated and the coordinates match the trader's location
|
||||
if (islandNorth.traderActivated.Value && x == 36 && y == 71)
|
||||
|
@ -467,8 +485,9 @@ namespace stardew_access.Features
|
|||
/// <param name="islandWest">The IslandWest to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetIslandWestInfo(IslandWest islandWest, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetIslandWestInfo(IslandWest islandWest, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
// Check if the coordinates match the shipping bin's location
|
||||
if ((islandWest.shippingBinPosition.X == x || (islandWest.shippingBinPosition.X + 1) == x) && islandWest.shippingBinPosition.Y == y)
|
||||
|
@ -486,8 +505,11 @@ namespace stardew_access.Features
|
|||
/// <param name="dungeon">The VolcanoDungeon to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name of the tile and the CATEGORY, or (null, null) if no relevant tile is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetVolcanoDungeonInfo(VolcanoDungeon dungeon, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetVolcanoDungeonInfo(VolcanoDungeon dungeon, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
if (!lessInfo)
|
||||
{
|
||||
if (dungeon.IsCooledLava(x, y))
|
||||
{
|
||||
|
@ -497,6 +519,7 @@ namespace stardew_access.Features
|
|||
{
|
||||
return ("Lava", CATEGORY.WaterTiles);
|
||||
}
|
||||
}
|
||||
|
||||
return (null, null);
|
||||
}
|
||||
|
@ -507,8 +530,9 @@ namespace stardew_access.Features
|
|||
/// <param name="islandLocation">The named IslandLocation to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetNamedIslandLocationInfo(IslandLocation islandLocation, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetNamedIslandLocationInfo(IslandLocation islandLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
object locationType = islandLocation is not null and IslandLocation ? islandLocation.Name ?? "Undefined Island Location" : islandLocation!.GetType();
|
||||
|
||||
|
@ -585,8 +609,9 @@ namespace stardew_access.Features
|
|||
/// <param name="islandLocation">The IslandLocation to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetIslandLocationInfo(IslandLocation islandLocation, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetIslandLocationInfo(IslandLocation islandLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
var nutTracker = Game1.player.team.collectedNutTracker;
|
||||
string? parrot = GetParrotPerchAtTile(islandLocation, x, y);
|
||||
|
@ -605,10 +630,10 @@ namespace stardew_access.Features
|
|||
|
||||
return islandLocation switch
|
||||
{
|
||||
IslandNorth islandNorth => GetIslandNorthInfo(islandNorth, x, y),
|
||||
IslandWest islandWest => GetIslandWestInfo(islandWest, x, y),
|
||||
VolcanoDungeon dungeon => GetVolcanoDungeonInfo(dungeon, x, y),
|
||||
_ => GetNamedIslandLocationInfo(islandLocation, x, y)
|
||||
IslandNorth islandNorth => GetIslandNorthInfo(islandNorth, x, y, lessInfo),
|
||||
IslandWest islandWest => GetIslandWestInfo(islandWest, x, y, lessInfo),
|
||||
VolcanoDungeon dungeon => GetVolcanoDungeonInfo(dungeon, x, y, lessInfo),
|
||||
_ => GetNamedIslandLocationInfo(islandLocation, x, y, lessInfo)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -618,8 +643,9 @@ namespace stardew_access.Features
|
|||
/// <param name="libraryMuseum">The LibraryMuseum containing the tile.</param>
|
||||
/// <param name="x">The x-coordinate of the tile.</param>
|
||||
/// <param name="y">The y-coordinate of the tile.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>The value of the "Action" property as a string, or null if the property is not found.</returns>
|
||||
private static string? GetTileActionPropertyValue(LibraryMuseum libraryMuseum, int x, int y)
|
||||
private static string? GetTileActionPropertyValue(LibraryMuseum libraryMuseum, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
xTile.Tiles.Tile tile = libraryMuseum.map.GetLayer("Buildings").PickTile(new xTile.Dimensions.Location(x * 64, y * 64), Game1.viewport.Size);
|
||||
return tile.Properties.TryGetValue("Action", out xTile.ObjectModel.PropertyValue? value) ? value.ToString() : null;
|
||||
|
@ -631,8 +657,9 @@ namespace stardew_access.Features
|
|||
/// <param name="libraryMuseum">The LibraryMuseum to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetLibraryMuseumInfo(LibraryMuseum libraryMuseum, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetLibraryMuseumInfo(LibraryMuseum libraryMuseum, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
if (libraryMuseum.museumPieces.TryGetValue(new Vector2(x, y), out int museumPiece))
|
||||
{
|
||||
|
@ -644,7 +671,7 @@ namespace stardew_access.Features
|
|||
string? action = libraryMuseum.doesTileHaveProperty(x, y, "Action", "Buildings");
|
||||
if (action != null && action.Contains("Notes"))
|
||||
{
|
||||
string? actionPropertyValue = GetTileActionPropertyValue(libraryMuseum, x, y);
|
||||
string? actionPropertyValue = GetTileActionPropertyValue(libraryMuseum, x, y, lessInfo);
|
||||
|
||||
if (actionPropertyValue != null)
|
||||
{
|
||||
|
@ -667,8 +694,9 @@ namespace stardew_access.Features
|
|||
/// <param name="town">The Town to search.</param>
|
||||
/// <param name="x">The x-coordinate to search.</param>
|
||||
/// <param name="y">The y-coordinate to search.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the object found, or (null, null) if no relevant object is found.</returns>
|
||||
private static (string? name, CATEGORY? category) GetTownInfo(Town town, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetTownInfo(Town town, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
if (SpecialOrder.IsSpecialOrdersBoardUnlocked() && x == 62 && y == 93)
|
||||
{
|
||||
|
@ -684,14 +712,15 @@ namespace stardew_access.Features
|
|||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <param name="x">The x coordinate of the tile.</param>
|
||||
/// <param name="y">The y coordinate of the tile.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple of (string? name, CATEGORY? category) for the feeding bench, or null if not applicable.</returns>
|
||||
private static (string? name, CATEGORY? category)? GetFeedingBenchInfo(GameLocation currentLocation, int x, int y)
|
||||
private static (string? name, CATEGORY? category)? GetFeedingBenchInfo(GameLocation currentLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
string locationName = currentLocation.Name;
|
||||
|
||||
if (FeedingBenchBounds.TryGetValue(locationName, out var bounds) && x >= bounds.minX && x <= bounds.maxX && y == bounds.y)
|
||||
{
|
||||
(string? name, CATEGORY category) = TileInfo.getObjectAtTile(x, y, currentLocation, true);
|
||||
(string? name, CATEGORY category) = TileInfo.getObjectAtTile(currentLocation, x, y, true);
|
||||
return (name?.Contains("hay", StringComparison.OrdinalIgnoreCase) == true ? "Feeding Bench" : "Empty Feeding Bench", category);
|
||||
}
|
||||
|
||||
|
@ -704,8 +733,9 @@ namespace stardew_access.Features
|
|||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <param name="x">The x coordinate of the tile.</param>
|
||||
/// <param name="y">The y coordinate of the tile.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>A tuple of (string? name, CATEGORY? category) for the object in the location, or null if not applicable.</returns>
|
||||
private static (string? name, CATEGORY? category) GetLocationByNameInfo(GameLocation currentLocation, int x, int y)
|
||||
private static (string? name, CATEGORY? category) GetLocationByNameInfo(GameLocation currentLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
object locationType = currentLocation is not null and GameLocation ? currentLocation.Name ?? "Undefined GameLocation" : currentLocation!.GetType(); string locationName = currentLocation.Name ?? "";
|
||||
if (locationName.Contains("coop", StringComparison.OrdinalIgnoreCase) || locationName.Contains("barn", StringComparison.OrdinalIgnoreCase))
|
||||
|
@ -734,12 +764,12 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Retrieves the dynamic tile information for the given coordinates in the specified location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <param name="x">The x-coordinate of the tile.</param>
|
||||
/// <param name="y">The y-coordinate of the tile.</param>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <param name="lessInfo">An optional boolean to return less detailed information. Defaults to false.</param>
|
||||
/// <returns>A tuple containing the name and CATEGORY of the dynamic tile, or null values if not found.</returns>
|
||||
public static (string? name, CATEGORY? category) GetDynamicTileAt(int x, int y, GameLocation currentLocation, bool lessInfo = false)
|
||||
public static (string? name, CATEGORY? category) GetDynamicTileAt(GameLocation currentLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
// Check for panning spots
|
||||
if (currentLocation.orePanPoint.Value != Point.Zero && currentLocation.orePanPoint.Value == new Point(x, y))
|
||||
|
@ -765,17 +795,17 @@ namespace stardew_access.Features
|
|||
// Retrieve dynamic tile information based on the current location type
|
||||
return currentLocation switch
|
||||
{
|
||||
Beach beach => GetBeachInfo(beach, x, y),
|
||||
BoatTunnel boatTunnel => GetBoatTunnelInfo(boatTunnel, x, y),
|
||||
CommunityCenter communityCenter => GetCommunityCenterInfo(communityCenter, x, y),
|
||||
Farm farm => GetFarmInfo(farm, x, y),
|
||||
FarmHouse farmHouse => GetFarmHouseInfo(farmHouse, x, y),
|
||||
Forest forest => GetForestInfo(forest, x, y),
|
||||
IslandFarmHouse islandFarmHouse => GetIslandFarmHouseInfo(islandFarmHouse, x, y),
|
||||
IslandLocation islandLocation => GetIslandLocationInfo(islandLocation, x, y),
|
||||
LibraryMuseum libraryMuseum => GetLibraryMuseumInfo(libraryMuseum, x, y),
|
||||
Town town => GetTownInfo(town, x, y),
|
||||
_ => GetLocationByNameInfo(currentLocation, x, y)
|
||||
Beach beach => GetBeachInfo(beach, x, y, lessInfo),
|
||||
BoatTunnel boatTunnel => GetBoatTunnelInfo(boatTunnel, x, y, lessInfo),
|
||||
CommunityCenter communityCenter => GetCommunityCenterInfo(communityCenter, x, y, lessInfo),
|
||||
Farm farm => GetFarmInfo(farm, x, y, lessInfo),
|
||||
FarmHouse farmHouse => GetFarmHouseInfo(farmHouse, x, y, lessInfo),
|
||||
Forest forest => GetForestInfo(forest, x, y, lessInfo),
|
||||
IslandFarmHouse islandFarmHouse => GetIslandFarmHouseInfo(islandFarmHouse, x, y, lessInfo),
|
||||
IslandLocation islandLocation => GetIslandLocationInfo(islandLocation, x, y, lessInfo),
|
||||
LibraryMuseum libraryMuseum => GetLibraryMuseumInfo(libraryMuseum, x, y, lessInfo),
|
||||
Town town => GetTownInfo(town, x, y, lessInfo),
|
||||
_ => GetLocationByNameInfo(currentLocation, x, y, lessInfo)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace stardew_access.Features
|
|||
{
|
||||
Vector2 dir = new(item.X + dirX[i], item.Y + dirY[i]);
|
||||
|
||||
if (!searched.Contains(dir) && (TileInfo.isWarpPointAtTile((int)dir.X, (int)dir.Y, currentLocation) || currentLocation.isTileOnMap(dir)))
|
||||
if (!searched.Contains(dir) && (TileInfo.isWarpPointAtTile(currentLocation, (int)dir.X, (int)dir.Y) || currentLocation.isTileOnMap(dir)))
|
||||
{
|
||||
toSearch.Enqueue(dir);
|
||||
searched.Add(dir);
|
||||
|
@ -231,7 +231,7 @@ namespace stardew_access.Features
|
|||
{
|
||||
if (currentLocation.isObjectAtTile((int)position.X, (int)position.Y))
|
||||
{
|
||||
(string? name, CATEGORY category) objDetails = TileInfo.getObjectAtTile((int)position.X, (int)position.Y, currentLocation);
|
||||
(string? name, CATEGORY category) objDetails = TileInfo.getObjectAtTile(currentLocation, (int)position.X, (int)position.Y);
|
||||
string? objectName = objDetails.name;
|
||||
CATEGORY category = objDetails.category;
|
||||
StardewValley.Object obj = currentLocation.getObjectAtTile((int)position.X, (int)position.Y);
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace stardew_access.Features
|
|||
}
|
||||
|
||||
var currentLocation = Game1.currentLocation;
|
||||
bool isColliding = TileInfo.IsCollidingAtTile(x, y, currentLocation);
|
||||
bool isColliding = TileInfo.IsCollidingAtTile(currentLocation, x, y);
|
||||
|
||||
(string? name, string? category) info = TileInfo.getNameWithCategoryNameAtTile(tile, currentLocation);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace stardew_access.Features
|
|||
return (staticTile.name, staticTile.category);
|
||||
}
|
||||
|
||||
(string? name, CATEGORY? category) dynamicTile = DynamicTiles.GetDynamicTileAt(x, y, currentLocation, lessInfo);
|
||||
(string? name, CATEGORY? category) dynamicTile = DynamicTiles.GetDynamicTileAt(currentLocation, x, y, lessInfo);
|
||||
if (dynamicTile.name != null)
|
||||
{
|
||||
return (dynamicTile.name, dynamicTile.category);
|
||||
|
@ -79,16 +79,16 @@ namespace stardew_access.Features
|
|||
|
||||
if (currentLocation.isObjectAtTile(x, y))
|
||||
{
|
||||
(string? name, CATEGORY? category) obj = getObjectAtTile(x, y, currentLocation, lessInfo);
|
||||
(string? name, CATEGORY? category) obj = getObjectAtTile(currentLocation, x, y, lessInfo);
|
||||
return (obj.name, obj.category);
|
||||
}
|
||||
|
||||
if (currentLocation.isWaterTile(x, y) && !lessInfo && IsCollidingAtTile(x, y, currentLocation))
|
||||
if (currentLocation.isWaterTile(x, y) && !lessInfo && IsCollidingAtTile(currentLocation, x, y))
|
||||
{
|
||||
return ("Water", CATEGORY.WaterTiles);
|
||||
}
|
||||
|
||||
string? resourceClump = getResourceClumpAtTile(x, y, currentLocation, lessInfo);
|
||||
string? resourceClump = getResourceClumpAtTile(currentLocation, x, y, lessInfo);
|
||||
if (resourceClump != null)
|
||||
{
|
||||
return (resourceClump, CATEGORY.ResourceClumps);
|
||||
|
@ -103,20 +103,20 @@ namespace stardew_access.Features
|
|||
}
|
||||
}
|
||||
|
||||
string? bush = GetBushAtTile(x, y, currentLocation, lessInfo);
|
||||
string? bush = GetBushAtTile(currentLocation, x, y, lessInfo);
|
||||
if (bush != null)
|
||||
{
|
||||
return (bush, CATEGORY.Bush);
|
||||
}
|
||||
|
||||
string? door = getDoorAtTile(x, y, currentLocation);
|
||||
string? warp = getWarpPointAtTile(x, y, currentLocation);
|
||||
string? door = getDoorAtTile(currentLocation, x, y);
|
||||
string? warp = getWarpPointAtTile(currentLocation, x, y);
|
||||
if (warp != null || door != null)
|
||||
{
|
||||
return (warp ?? door, CATEGORY.Doors);
|
||||
}
|
||||
|
||||
string? junimoBundle = GetJunimoBundleAt(x, y, currentLocation);
|
||||
string? junimoBundle = GetJunimoBundleAt(currentLocation, x, y);
|
||||
if (junimoBundle != null)
|
||||
{
|
||||
return (junimoBundle, CATEGORY.JunimoBundle);
|
||||
|
@ -150,12 +150,12 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Gets the bush at the specified tile coordinates in the provided GameLocation.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The GameLocation instance to search for bushes.</param>
|
||||
/// <param name="x">The x-coordinate of the tile to check.</param>
|
||||
/// <param name="y">The y-coordinate of the tile to check.</param>
|
||||
/// <param name="currentLocation">The GameLocation instance to search for bushes.</param>
|
||||
/// <param name="lessInfo">Whether to return less information about the bush.</param>
|
||||
/// <returns>A string describing the bush if one is found at the specified coordinates, otherwise null.</returns>
|
||||
public static string? GetBushAtTile(int x, int y, GameLocation currentLocation, bool lessInfo = false)
|
||||
public static string? GetBushAtTile(GameLocation currentLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
Bush? bush = (Bush)currentLocation.getLargeTerrainFeatureAt(x, y);
|
||||
|
||||
|
@ -201,11 +201,11 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Determines if there is a Junimo bundle at the specified tile coordinates in the provided GameLocation.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The GameLocation instance to search for Junimo bundles.</param>
|
||||
/// <param name="x">The x-coordinate of the tile to check.</param>
|
||||
/// <param name="y">The y-coordinate of the tile to check.</param>
|
||||
/// <param name="currentLocation">The GameLocation instance to search for Junimo bundles.</param>
|
||||
/// <returns>The name of the Junimo bundle if one is found at the specified coordinates, otherwise null.</returns>
|
||||
public static string? GetJunimoBundleAt(int x, int y, GameLocation currentLocation)
|
||||
public static string? GetJunimoBundleAt(GameLocation currentLocation, int x, int y)
|
||||
{
|
||||
if (currentLocation is CommunityCenter communityCenter)
|
||||
{
|
||||
|
@ -246,25 +246,25 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Determines if there is a collision at the specified tile coordinates in the provided GameLocation.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The GameLocation instance to search for collisions.</param>
|
||||
/// <param name="x">The x-coordinate of the tile to check.</param>
|
||||
/// <param name="y">The y-coordinate of the tile to check.</param>
|
||||
/// <param name="currentLocation">The GameLocation instance to search for collisions.</param>
|
||||
/// <returns>True if a collision is detected at the specified tile coordinates, otherwise False.</returns>
|
||||
public static bool IsCollidingAtTile(int x, int y, GameLocation currentLocation)
|
||||
public static bool IsCollidingAtTile(GameLocation currentLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
// This function highly optimized over readability because `currentLocation.isCollidingPosition` takes ~30ms on the Farm map, more on larger maps I.E. Forest.
|
||||
// Return the result of the logical comparison directly, inlining operations
|
||||
// Check if the tile is NOT a warp point and if it collides with an object or terrain feature
|
||||
// OR if the tile has stumps in a Woods location
|
||||
return !isWarpPointAtTile(x, y, currentLocation) &&
|
||||
return !isWarpPointAtTile(currentLocation, x, y) &&
|
||||
(currentLocation.isCollidingPosition(new Rectangle(x * 64 + 1, y * 64 + 1, 62, 62), Game1.viewport, true, 0, glider: false, Game1.player, pathfinding: true) ||
|
||||
(currentLocation is Woods woods && getStumpsInWoods(x, y, woods) is not null));
|
||||
(currentLocation is Woods woods && getStumpsInWoods(woods, x, y, lessInfo) is not null));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Warp object at the specified tile coordinates or null if not found.
|
||||
/// </summary>
|
||||
private static Warp? GetWarpAtTile(int x, int y, GameLocation currentLocation)
|
||||
private static Warp? GetWarpAtTile(GameLocation currentLocation, int x, int y)
|
||||
{
|
||||
if (currentLocation is null) return null;
|
||||
|
||||
|
@ -281,13 +281,13 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Returns the name of the warp point at the specified tile coordinates, or null if not found.
|
||||
/// </summary>
|
||||
public static string? getWarpPointAtTile(int x, int y, GameLocation currentLocation)
|
||||
public static string? getWarpPointAtTile(GameLocation currentLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
Warp? warpPoint = GetWarpAtTile(x, y, currentLocation);
|
||||
Warp? warpPoint = GetWarpAtTile(currentLocation, x, y);
|
||||
|
||||
if (warpPoint != null)
|
||||
{
|
||||
return $"{warpPoint.TargetName} Entrance";
|
||||
return lessInfo ? warpPoint.TargetName : $"{warpPoint.TargetName} Entrance";
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -296,9 +296,9 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Returns true if there's a warp point at the specified tile coordinates, or false otherwise.
|
||||
/// </summary>
|
||||
public static bool isWarpPointAtTile(int x, int y, GameLocation currentLocation)
|
||||
public static bool isWarpPointAtTile(GameLocation currentLocation, int x, int y)
|
||||
{
|
||||
return GetWarpAtTile(x, y, currentLocation) != null;
|
||||
return GetWarpAtTile(currentLocation, x, y) != null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -311,7 +311,7 @@ namespace stardew_access.Features
|
|||
/// A string containing the farm animal's name, type, and age if a farm animal is found at the specified tile;
|
||||
/// null if no farm animal is found or if the location is not a Farm or an AnimalHouse.
|
||||
/// </returns>
|
||||
public static string? getFarmAnimalAt(GameLocation? location, int x, int y)
|
||||
public static string? getFarmAnimalAt(GameLocation location, int x, int y)
|
||||
{
|
||||
// Return null if the location is null or not a Farm or AnimalHouse
|
||||
if (location is null || !(location is Farm || location is AnimalHouse))
|
||||
|
@ -563,12 +563,12 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Retrieves the name and category of an object at a specific tile in the game location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The current game location.</param>
|
||||
/// <param name="x">The X coordinate of the tile.</param>
|
||||
/// <param name="y">The Y coordinate of the tile.</param>
|
||||
/// <param name="currentLocation">The current game location.</param>
|
||||
/// <param name="lessInfo">An optional parameter to display less information, set to false by default.</param>
|
||||
/// <returns>A tuple containing the object's name and category.</returns>
|
||||
public static (string? name, CATEGORY category) getObjectAtTile(int x, int y, GameLocation currentLocation, bool lessInfo = false)
|
||||
public static (string? name, CATEGORY category) getObjectAtTile(GameLocation currentLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
(string? name, CATEGORY category) toReturn = (null, CATEGORY.Others);
|
||||
|
||||
|
@ -783,12 +783,12 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Check if a tile with the specified index exists at the given coordinates in the specified location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The current game location.</param>
|
||||
/// <param name="x">The X coordinate of the tile.</param>
|
||||
/// <param name="y">The Y coordinate of the tile.</param>
|
||||
/// <param name="currentLocation">The current game location.</param>
|
||||
/// <param name="targetTileIndex">The target tile index to check for.</param>
|
||||
/// <returns>True if a tile with the specified index exists at the given coordinates, false otherwise.</returns>
|
||||
private static bool CheckTileIndex(int x, int y, GameLocation currentLocation, int targetTileIndex)
|
||||
private static bool CheckTileIndex(GameLocation currentLocation, int x, int y, int targetTileIndex)
|
||||
{
|
||||
var tile = currentLocation.Map.GetLayer("Buildings").Tiles[x, y];
|
||||
return tile != null && tile.TileIndex == targetTileIndex;
|
||||
|
@ -797,70 +797,67 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Determines if a mine down ladder is present at the specified tile location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <param name="x">The x-coordinate of the tile.</param>
|
||||
/// <param name="y">The y-coordinate of the tile.</param>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <returns>True if a mine down ladder is found at the specified tile, otherwise false.</returns>
|
||||
public static bool isMineDownLadderAtTile(int x, int y, GameLocation currentLocation)
|
||||
public static bool isMineDownLadderAtTile(GameLocation currentLocation, int x, int y)
|
||||
{
|
||||
return currentLocation is Mine or MineShaft || currentLocation.Name == "SkullCave"
|
||||
? CheckTileIndex(x, y, currentLocation, 173)
|
||||
? CheckTileIndex(currentLocation, x, y, 173)
|
||||
: false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if a mine shaft is present at the specified tile location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <param name="x">The x-coordinate of the tile.</param>
|
||||
/// <param name="y">The y-coordinate of the tile.</param>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <returns>True if a mine shaft is found at the specified tile, otherwise false.</returns>
|
||||
public static bool isShaftAtTile(int x, int y, GameLocation currentLocation)
|
||||
public static bool isShaftAtTile(GameLocation currentLocation, int x, int y)
|
||||
{
|
||||
return currentLocation is Mine or MineShaft || currentLocation.Name == "SkullCave"
|
||||
? CheckTileIndex(x, y, currentLocation, 174)
|
||||
? CheckTileIndex(currentLocation, x, y, 174)
|
||||
: false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if a mine up ladder is present at the specified tile location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <param name="x">The x-coordinate of the tile.</param>
|
||||
/// <param name="y">The y-coordinate of the tile.</param>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <returns>True if a mine up ladder is found at the specified tile, otherwise false.</returns>
|
||||
public static bool isMineUpLadderAtTile(int x, int y, GameLocation currentLocation)
|
||||
public static bool isMineUpLadderAtTile(GameLocation currentLocation, int x, int y)
|
||||
{
|
||||
return currentLocation is Mine or MineShaft || currentLocation.Name == "SkullCave"
|
||||
? CheckTileIndex(x, y, currentLocation, 115)
|
||||
? CheckTileIndex(currentLocation, x, y, 115)
|
||||
: false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if an elevator is present at the specified tile location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <param name="x">The x-coordinate of the tile.</param>
|
||||
/// <param name="y">The y-coordinate of the tile.</param>
|
||||
/// <param name="currentLocation">The current GameLocation instance.</param>
|
||||
/// <returns>True if an elevator is found at the specified tile, otherwise false.</returns>
|
||||
public static bool isElevatorAtTile(int x, int y, GameLocation currentLocation)
|
||||
public static bool isElevatorAtTile(GameLocation currentLocation, int x, int y)
|
||||
{
|
||||
return currentLocation is Mine or MineShaft || currentLocation.Name == "SkullCave"
|
||||
? CheckTileIndex(x, y, currentLocation, 112)
|
||||
? CheckTileIndex(currentLocation, x, y, 112)
|
||||
: false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the door information at the specified tile coordinates in the given location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The GameLocation where the door might be found.</param>
|
||||
/// <param name="x">The x-coordinate of the tile to check.</param>
|
||||
/// <param name="y">The y-coordinate of the tile to check.</param>
|
||||
/// <param name="currentLocation">The GameLocation where the door might be found.</param>
|
||||
/// <returns>
|
||||
/// A string containing the door information if a door is found at the specified tile;
|
||||
/// null if no door is found.
|
||||
/// </returns>
|
||||
public static string? getDoorAtTile(int x, int y, GameLocation currentLocation)
|
||||
/// <returns>A string containing the door information if a door is found at the specified tile; null if no door is found.</returns>
|
||||
public static string? getDoorAtTile(GameLocation currentLocation, int x, int y)
|
||||
{
|
||||
// Create a Point object from the given tile coordinates
|
||||
Point tilePoint = new(x, y);
|
||||
|
@ -882,19 +879,16 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Gets the resource clump information at the specified tile coordinates in the given location.
|
||||
/// </summary>
|
||||
/// <param name="currentLocation">The GameLocation where the resource clump might be found.</param>
|
||||
/// <param name="x">The x-coordinate of the tile to check.</param>
|
||||
/// <param name="y">The y-coordinate of the tile to check.</param>
|
||||
/// <param name="currentLocation">The GameLocation where the resource clump might be found.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the resource clump's origin. Default is false.</param>
|
||||
/// <returns>
|
||||
/// A string containing the resource clump information if a resource clump is found at the specified tile;
|
||||
/// null if no resource clump is found.
|
||||
/// </returns>
|
||||
public static string? getResourceClumpAtTile(int x, int y, GameLocation currentLocation, bool lessInfo = false)
|
||||
/// <returns>A string containing the resource clump information if a resource clump is found at the specified tile; null if no resource clump is found.</returns>
|
||||
public static string? getResourceClumpAtTile(GameLocation currentLocation, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
// Check if the current location is Woods and handle stumps in woods separately
|
||||
if (currentLocation is Woods woods)
|
||||
return getStumpsInWoods(x, y, woods, lessInfo);
|
||||
return getStumpsInWoods(woods, x, y, lessInfo);
|
||||
|
||||
// Iterate through resource clumps in the location using a for loop for performance reasons
|
||||
for (int i = 0, count = currentLocation.resourceClumps.Count; i < count; i++)
|
||||
|
@ -916,15 +910,12 @@ namespace stardew_access.Features
|
|||
/// <summary>
|
||||
/// Gets the stump information at the specified tile coordinates in the given Woods location.
|
||||
/// </summary>
|
||||
/// <param name="woods">The Woods location where the stump might be found.</param>
|
||||
/// <param name="x">The x-coordinate of the tile to check.</param>
|
||||
/// <param name="y">The y-coordinate of the tile to check.</param>
|
||||
/// <param name="woods">The Woods location where the stump might be found.</param>
|
||||
/// <param name="lessInfo">Optional. If true, returns information only if the tile coordinates match the stump's origin. Default is false.</param>
|
||||
/// <returns>
|
||||
/// A string containing the stump information if a stump is found at the specified tile;
|
||||
/// null if no stump is found.
|
||||
/// </returns>
|
||||
public static string? getStumpsInWoods(int x, int y, Woods woods, bool lessInfo = false)
|
||||
/// <returns>A string containing the stump information if a stump is found at the specified tile; null if no stump is found.</returns>
|
||||
public static string? getStumpsInWoods(Woods woods, int x, int y, bool lessInfo = false)
|
||||
{
|
||||
// Iterate through stumps in the Woods location
|
||||
foreach (var stump in woods.stumps)
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace stardew_access.Features
|
|||
if (name == null)
|
||||
{
|
||||
// Report if a tile is empty or blocked if there is nothing on it
|
||||
if (TileInfo.IsCollidingAtTile((int)tile.X, (int)tile.Y, Game1.currentLocation))
|
||||
if (TileInfo.IsCollidingAtTile(Game1.currentLocation, (int)tile.X, (int)tile.Y))
|
||||
{
|
||||
name = "blocked";
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ namespace stardew_access.Features
|
|||
{
|
||||
var currentLocation = Game1.currentLocation;
|
||||
// Check whether the position is a warp point, if so then return true, sometimes warp points are 1 tile off the map for example in coops and barns
|
||||
if (TileInfo.isWarpPointAtTile((int)(position.X / Game1.tileSize), (int)(position.Y / Game1.tileSize), currentLocation)) return true;
|
||||
if (TileInfo.isWarpPointAtTile(currentLocation, (int)(position.X / Game1.tileSize), (int)(position.Y / Game1.tileSize))) return true;
|
||||
|
||||
//position does not take viewport into account since the entire map needs to be checked.
|
||||
Map map = currentLocation.map;
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace stardew_access.Patches
|
|||
if (cueName == "grassyStep" || cueName == "sandyStep" || cueName == "snowyStep" || cueName == "stoneStep" || cueName == "thudStep" || cueName == "woodyStep")
|
||||
{
|
||||
Vector2 nextTile = CurrentPlayer.FacingTile;
|
||||
if (TileInfo.IsCollidingAtTile((int)nextTile.X, (int)nextTile.Y, Game1.currentLocation))
|
||||
if (TileInfo.IsCollidingAtTile(Game1.currentLocation, (int)nextTile.X, (int)nextTile.Y))
|
||||
{
|
||||
if (prevTile != nextTile)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue