Exemple #1
0
        internal static void PatchMapDisplayDevice(ref IDisplayDevice __result)
        {
            if (MapDisplayDevice == null)
            {
                MapDisplayDevice = new MapTKDisplayDevice(Game1.content, Game1.graphics.GraphicsDevice, MapTKMod.CompatOptions.Contains("SpriteMaster"));
            }

            __result = MapDisplayDevice;
        }
Exemple #2
0
        private void SetMapDisplayDevice()
        {
            Harmony instance = new Harmony("MatpTK.MapTKDisplayDevice");

            instance.Patch(
                original: AccessTools.Method(Type.GetType("StardewModdingAPI.Framework.SCore, StardewModdingAPI"), "GetMapDisplayDevice"),
                postfix: new HarmonyMethod(typeof(PlatoTKMod), nameof(PatchMapDisplayDevice))
                );

            if (MapDisplayDevice == null)
            {
                MapDisplayDevice = new MapTKDisplayDevice(Game1.content, Game1.graphics.GraphicsDevice, MapTKMod.CompatOptions.Contains("SpriteMaster"));
            }

            Game1.mapDisplayDevice = MapDisplayDevice;
        }