Skip to content

Commit

Permalink
fix held sprinkler range display in recent game versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathoschild committed Oct 28, 2024
1 parent 995a9ae commit 8f39cce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DataLayers/Layers/Coverage/SprinklerLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ private IEnumerable<Vector2> GetCoverage(SObject sprinkler, Vector2 origin, IDic
{
// get vanilla tiles
IEnumerable<Vector2> tiles = sprinkler.GetSprinklerTiles();
if (isHeld)
tiles = tiles.Select(tile => tile + origin); // when the sprinkler is held, the vanilla coverage is relative to (0, 0)
if (isHeld && sprinkler.TileLocation == Vector2.Zero)
tiles = tiles.Select(tile => tile + origin);

// add custom tiles
if (customSprinklerRanges.TryGetValue(sprinkler.QualifiedItemId, out Vector2[]? customTiles))
Expand Down
1 change: 1 addition & 0 deletions DataLayers/docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Added support for Ultimate Fertilizer's multi-fertilizer feature.
* Fixed lag if a bee house, Junimo hut, scarecrow, or sprinkler has an extremely large range.
* Fixed error with unfertilized tiles when Ultimate Fertilizer is installed.
* Fixed held sprinkler's range not shown correctly in newer game versions.
* Improved translations. Thanks to Creeperkatze (updated German) and moonggae (updated Korean)!

## 1.17.2
Expand Down

0 comments on commit 8f39cce

Please sign in to comment.