Beispiel #1
0
        public void DisplayWeather(TV tv, TemporaryAnimatedSprite sprite, Farmer who, string answer)
        {
            TemporaryAnimatedSprite BackgroundSprite = new TemporaryAnimatedSprite("LooseSprites\\Cursors", new Rectangle(497, 305, 42, 28), 9999f, 1, 999999, tv.getScreenPosition(), false, false, (float)((tv.boundingBox.Bottom - 1) / 10000.0 + 9.99999974737875E-06), 0.0f, Color.White, tv.getScreenSizeModifier(), 0.0f, 0.0f, 0.0f, false);
            TemporaryAnimatedSprite WeatherSprite    = DescriptionEngine.GetWeatherOverlay(Conditions, tv);

            string OnScreenText = "";

            if (BackgroundSprite is null)
            {
                Monitor.Log("Background Sprite is null");
            }
            if (WeatherSprite is null)
            {
                Monitor.Log("Weather Sprite is null");
            }

            string MoonPhase = "";

            if (UseLunarDisturbancesApi)
            {
                MoonPhase = MoonAPI.GetCurrentMoonPhase();
            }

            OnScreenText += DescriptionEngine.GenerateTVForecast(Conditions, MoonPhase);

            CustomTVMod.showProgram(BackgroundSprite, OnScreenText, CustomTVMod.endProgram, WeatherSprite);
        }
        public void DisplayWeather(TV tv, TemporaryAnimatedSprite sprite, Farmer who, string answer)
        {
            TemporaryAnimatedSprite BackgroundSprite = new TemporaryAnimatedSprite("LooseSprites\\Cursors", new Rectangle(497, 305, 42, 28), 9999f, 1, 999999, tv.getScreenPosition(), false, false, (float)((tv.boundingBox.Bottom - 1) / 10000.0 + 9.99999974737875E-06), 0.0f, Color.White, tv.getScreenSizeModifier(), 0.0f, 0.0f, 0.0f, false);
            TemporaryAnimatedSprite WeatherSprite    = DescriptionEngine.GetWeatherOverlay(Conditions, tv);

            string OnScreenText = "";

            if (BackgroundSprite is null)
            {
                Monitor.Log("Background Sprite is null");
            }
            if (WeatherSprite is null)
            {
                Monitor.Log("Weather Sprite is null");
            }

            string MoonPhase = "";
            bool   MoonIsUp  = false;

            if (UseLunarDisturbancesApi)
            {
                MoonPhase = MoonAPI.GetCurrentMoonPhase();
                MoonIsUp  = MoonAPI.IsMoonUp(Game1.timeOfDay);
            }

            double fog = ClimatesOfFerngill.GetClimateForDay(SDate.Now().AddDays(1)).RetrieveOdds(Dice, "fog", SDate.Now().AddDays(1).Day);

            OnScreenText += DescriptionEngine.GenerateTVForecast(Conditions, Dice, fog, MoonPhase, MoonIsUp);

            //CustomTVMod.showProgram(BackgroundSprite, OnScreenText, CustomTVMod.endProgram, WeatherSprite);
        }
Beispiel #3
0
        public void DisplayWeather(TV tv, TemporaryAnimatedSprite sprite, StardewValley.Farmer who, string answer)
        {
            TemporaryAnimatedSprite BackgroundSprite = new TemporaryAnimatedSprite(Game1.mouseCursors, new Rectangle(497, 305, 42, 28), 9999f, 1, 999999, tv.getScreenPosition(), false, false, (float)((double)(tv.boundingBox.Bottom - 1) / 10000.0 + 9.99999974737875E-06), 0.0f, Color.White, tv.getScreenSizeModifier(), 0.0f, 0.0f, 0.0f, false);
            TemporaryAnimatedSprite WeatherSprite    = DescriptionEngine.GetWeatherOverlay(Conditions, tv);

            string OnScreenText = "";

            if (BackgroundSprite is null)
            {
                Monitor.Log("Background Sprite is null");
            }
            if (WeatherSprite is null)
            {
                Monitor.Log("Weather Sprite is null");
            }

            OnScreenText += DescriptionEngine.GenerateTVForecast(Conditions, OurMoon);

            CustomTVMod.showProgram(BackgroundSprite, OnScreenText, CustomTVMod.endProgram, WeatherSprite);
        }