/* * Show messages in chat */ private static void SendChatMessage(IEnumerable <string> messages) { foreach (string message in messages) { ModEvents.SendChatMessage(message); } }
/* * Weather */ private static string GetTownForecast() { WorldDate date = new WorldDate(Game1.Date); ++date.TotalDays; return(ModEvents.GetWeatherInformation("Pelican Town forecast", !Game1.IsMasterGame ? Game1.getWeatherModificationsForDate(date, Game1.netWorldState.Value.WeatherForTomorrow) : Game1.getWeatherModificationsForDate(date, Game1.weatherForTomorrow))); }
private static string GetIslandForecast() { if (!ModEntry.PlayerBeenToIsland()) { return(null); } return(ModEvents.GetWeatherInformation("Ginger Island forecast", Game1.netWorldState.Value.GetWeatherForLocation( Game1.getLocationFromName("IslandSouth").GetLocationContext() ).weatherForTomorrow.Value)); }
public static void OnDayStart(object sender, DayStartedEventArgs e) { if (!Context.IsWorldReady) { return; } // Send messages for each event ModEvents.SendChatMessage(new [] { ModEvents.GetTownForecast(), ModEvents.GetIslandForecast(), ModEvents.GetDailyLuck(), ModEvents.GetQueenOfSauce() }); }