Portraiture

Portraiture

10k Downloads

CustomTVMod: Issue replacing tv channel.

Sakorona opened this issue ยท 2 comments

commented

Invoking Code:

        CustomTVMod.changeAction("weather", DisplayWeather);

        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(tv);

            string OnScreenText = Game1.content.LoadString("Strings\\StringsFromCSFiles:TV.cs.13136");
            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);
        }

In-game, it doesn't ever display text, just auto closes, and then won't let me close the tv menu either.

Log report is: https://log.smapi.io/cVfpLLvG

commented

Forgot to come back, but yes, fixed.