mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Should not have been adding a listener per slide
This commit is contained in:
parent
bcf0c2d0d9
commit
79c5c46403
@ -1,3 +1,4 @@
|
|||||||
|
using HarmonyLib;
|
||||||
using NewHorizons.External.Modules.Props;
|
using NewHorizons.External.Modules.Props;
|
||||||
using NewHorizons.External.Modules.Props.EchoesOfTheEye;
|
using NewHorizons.External.Modules.Props.EchoesOfTheEye;
|
||||||
using NewHorizons.Handlers;
|
using NewHorizons.Handlers;
|
||||||
@ -8,13 +9,10 @@ using OWML.Common;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
|
||||||
using UnityEngine;
|
|
||||||
using static NewHorizons.Main;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using HarmonyLib;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
using Epic.OnlineServices.Presence;
|
using static NewHorizons.Main;
|
||||||
|
|
||||||
namespace NewHorizons.Builder.Props
|
namespace NewHorizons.Builder.Props
|
||||||
{
|
{
|
||||||
@ -471,6 +469,12 @@ namespace NewHorizons.Builder.Props
|
|||||||
NHLogger.Log($"SLIDE REEL ATLAS from {slides.First().imagePath}: {s}");
|
NHLogger.Log($"SLIDE REEL ATLAS from {slides.First().imagePath}: {s}");
|
||||||
ImageUtilities.TrackCachedTexture(atlasKey, t);
|
ImageUtilities.TrackCachedTexture(atlasKey, t);
|
||||||
});
|
});
|
||||||
|
invertedImageLoader.imageLoadedEvent.AddListener((Texture2D t, int i, string s) =>
|
||||||
|
{
|
||||||
|
var path = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, slides[i].imagePath);
|
||||||
|
var key = $"{ImageUtilities.GetKey(path)} > invert";
|
||||||
|
ImageUtilities.TrackCachedTexture(key, t);
|
||||||
|
});
|
||||||
|
|
||||||
for (int i = 0; i < slides.Length; i++)
|
for (int i = 0; i < slides.Length; i++)
|
||||||
{
|
{
|
||||||
@ -486,13 +490,6 @@ namespace NewHorizons.Builder.Props
|
|||||||
{
|
{
|
||||||
// attempt to load inverted guy from disk and precache so theres a cache hit when using ImageUtilities
|
// attempt to load inverted guy from disk and precache so theres a cache hit when using ImageUtilities
|
||||||
invertedImageLoader.PathsToLoad.Add((i, Path.Combine(mod.ModHelper.Manifest.ModFolderPath, INVERTED_SLIDE_CACHE_FOLDER, slideInfo.imagePath)));
|
invertedImageLoader.PathsToLoad.Add((i, Path.Combine(mod.ModHelper.Manifest.ModFolderPath, INVERTED_SLIDE_CACHE_FOLDER, slideInfo.imagePath)));
|
||||||
invertedImageLoader.imageLoadedEvent.AddListener((Texture2D t, int i, string s) =>
|
|
||||||
{
|
|
||||||
var path = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, slides[i].imagePath);
|
|
||||||
var key = $"{ImageUtilities.GetKey(path)} > invert";
|
|
||||||
ImageUtilities.TrackCachedTexture(key, t);
|
|
||||||
});
|
|
||||||
|
|
||||||
imageLoader.PathsToLoad.Add((i, Path.Combine(mod.ModHelper.Manifest.ModFolderPath, slideInfo.imagePath)));
|
imageLoader.PathsToLoad.Add((i, Path.Combine(mod.ModHelper.Manifest.ModFolderPath, slideInfo.imagePath)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"author": "xen, Bwc9876, JohnCorby, MegaPiggy, Clay, Trifid, and friends",
|
"author": "xen, Bwc9876, JohnCorby, MegaPiggy, Clay, Trifid, and friends",
|
||||||
"name": "New Horizons",
|
"name": "New Horizons",
|
||||||
"uniqueName": "xen.NewHorizons",
|
"uniqueName": "xen.NewHorizons",
|
||||||
"version": "1.21.2",
|
"version": "1.21.3",
|
||||||
"owmlVersion": "2.12.1",
|
"owmlVersion": "2.12.1",
|
||||||
"dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
"dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||||
"conflicts": [ "PacificEngine.OW_CommonResources" ],
|
"conflicts": [ "PacificEngine.OW_CommonResources" ],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user