[#bugs] in the barathrumite compound, the look box for the leftmost vacuum column tape d...

Issue #6061 resolved
Freehold Games Bot Account created an issue

Marked for crossposting by: the hoary demon helado

Message (jump):

<the hoary demon helado> in the barathrumite compound, the look box for the leftmost vacuum column tape drive shows a flame effect on it because it overlaps where a torch sconce is in the actual zone

Comments (10)

  1. Sol

    did you need more information on this one to reproduce it? i’m still seeing it on current patch. i wasn’t able to get a screenshot last time but here is one

  2. Sol

    the torch there is the lower right torch in the room with the non-locked staircase

    the general rule is: if there is a torch effect at the real zone tile where the preview of the item would be rendered, then the preview is rendered with the torch effect. i just gave that one because it was where i noticed it but assumed that if you spotted the problem then the fix would generalize well enough

  3. Noelle Lavenza

    This has been reported in #1128. #1740, #3088, #4203, #5109, #5116, #5683, and #5895.

    The issue is in ConsoleLib.Console.ScreenBuffer public void Write(IRenderable r). It appears that at some point the signature of Write(string Tile, string RenderString, string ColorString, string TileColor, string DetailColor, bool SuppressImposters = true, bool HFlip = false, bool VFlip = false) lacked the SuppressImposters argument, so Write(IRenderable r) passes r.getHFlip() as SuppressImposters instead of as HFlip. Since HFlip defaults to false, this means SuppressImposters is also false except for situations in which HFlip is true.

    A complete Harmony patch tested to demonstrate the issue and subsequent fix is as follows:

    using System;
    using ConsoleLib.Console;
    using HarmonyLib;
    
    /// <summary>
    /// Patches ConsoleLib.Console.Screenbuffer to pass HFlip and VFlip properly.
    /// </summary>
    [HarmonyPatch(typeof(ConsoleLib.Console.ScreenBuffer), "Write", new Type[] { typeof(IRenderable) })]
    public class TorchFix_Patcher
    {
        static bool Prefix(ref ScreenBuffer __instance, IRenderable r)
        {
            if (r == null)
            {
                __instance.Write("{{M|?}}");
            }
            else
            {
                __instance.Write(r.getTile(), r.getRenderString(), r.getColorString(), r.getTileColor(), r.getDetailColor(), HFlip: r.getHFlip(), VFlip: r.getVFlip());
            }
            return false; // skip the original method
        }
    }
    

  4. Log in to comment