示例#1
0
        /*
         * Show messages in chat
         */

        private static void SendChatMessage(IEnumerable <string> messages)
        {
            foreach (string message in messages)
            {
                ModEvents.SendChatMessage(message);
            }
        }
示例#2
0
        /*
         * 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)));
        }
示例#3
0
 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));
 }
示例#4
0
        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()
            });
        }