Solved [1.6.9] Night events objects placement [Linux]

mouahrara

Greenhorn
Information:
  • OS Version: Unix 6.10.10.1
  • Stardew Valley Version: 1.6.9 'beta' (build 24267)
  • Code Decompiled with: Avalonia ILSpy 7.2 RC

Description:
The Meteorite, Stone Owl, and Strange Capsule night events place objects using the following code:
  • Meteorite: targetLocation = new Vector2(random.Next(5, farm.map.RequireLayer("Back").TileWidth - 20), random.Next(5, farm.map.RequireLayer("Back").TileHeight - 4));
  • Stone Owl: targetLocation = new Vector2(random.Next(5, farm.map.RequireLayer("Back").TileWidth - 4), random.Next(5, farm.map.RequireLayer("Back").TileHeight - 4));
  • Strange Capsule: targetLocation = new Vector2(random.Next(5, farm.map.RequireLayer("Back").TileWidth - 4), random.Next(5, farm.map.RequireLayer("Back").TileHeight - 4));
The code uses the tile size (TileWidth and TileHeight) when it should use the map size (LayerWidth and LayerHeight).
 
Top