public static void DiveTo(DiveLocation diveLocation, Farmer farmer) { DivePosition dp = diveLocation.OtherMapPos; if (dp == null) { Monitor.Log($"Diving to existing tile position"); Point pos = farmer.getTileLocationPoint(); dp = new DivePosition() { X = pos.X, Y = pos.Y }; } if (!IsMapUnderwater(farmer.currentLocation.Name)) { ModEntry.bubbles.Clear(); } else { } Game1.playSound("pullItemFromWater"); Game1.warpFarmer(diveLocation.OtherMapName, dp.X, dp.Y, false); }
public static void DiveTo(DiveLocation diveLocation) { DivePosition dp = diveLocation.OtherMapPos; if (dp == null) { Monitor.Log($"Diving to existing tile position"); Point pos = Game1.player.getTileLocationPoint(); dp = new DivePosition() { X = pos.X, Y = pos.Y }; } if (!IsMapUnderwater(Game1.player.currentLocation.Name)) { ModEntry.bubbles.Value.Clear(); } else { Game1.changeMusicTrack("none", false, Game1.MusicContext.Default); } Game1.playSound("pullItemFromWater"); Game1.warpFarmer(diveLocation.OtherMapName, dp.X, dp.Y, false); }