Don't bother with regular images when using the cache

This commit is contained in:
Nick 2024-06-18 00:18:07 -04:00
parent 90d2a1ee99
commit c923af084b

View File

@ -529,8 +529,11 @@ namespace NewHorizons.Builder.Props
// Load the inverted images used when displaying slide reels to a screen // Load the inverted images used when displaying slide reels to a screen
invertedImageLoader.PathsToLoad.Add((i, Path.Combine(Instance.ModHelper.Manifest.ModFolderPath, "Assets/textures/inverted_blank_slide_reel.png"))); invertedImageLoader.PathsToLoad.Add((i, Path.Combine(Instance.ModHelper.Manifest.ModFolderPath, "Assets/textures/inverted_blank_slide_reel.png")));
} }
else
{
imageLoader.PathsToLoad.Add((i, Path.Combine(Instance.ModHelper.Manifest.ModFolderPath, "Assets/textures/blank_slide_reel.png"))); imageLoader.PathsToLoad.Add((i, Path.Combine(Instance.ModHelper.Manifest.ModFolderPath, "Assets/textures/blank_slide_reel.png")));
} }
}
else else
{ {
if (useInvertedCache && cacheExists) if (useInvertedCache && cacheExists)
@ -538,8 +541,11 @@ namespace NewHorizons.Builder.Props
// Load the inverted images used when displaying slide reels to a screen // Load the inverted images used when displaying slide reels to a screen
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)));
} }
else
{
imageLoader.PathsToLoad.Add((i, Path.Combine(mod.ModHelper.Manifest.ModFolderPath, slideInfo.imagePath))); imageLoader.PathsToLoad.Add((i, Path.Combine(mod.ModHelper.Manifest.ModFolderPath, slideInfo.imagePath)));
} }
}
AddModules(slideInfo, ref slide, mod); AddModules(slideInfo, ref slide, mod);
@ -548,15 +554,19 @@ namespace NewHorizons.Builder.Props
if (cacheExists) if (cacheExists)
{ {
if (useInvertedCache)
{
invertedImageLoader.Start(true);
}
if (useAtlasCache) if (useAtlasCache)
{ {
atlasImageLoader.Start(false); atlasImageLoader.Start(false);
} }
// When using the inverted cache we never need the regular images
if (useInvertedCache)
{
invertedImageLoader.Start(true);
}
else
{
imageLoader.Start(true); imageLoader.Start(true);
}
return (invertedImageLoader, atlasImageLoader, imageLoader); return (invertedImageLoader, atlasImageLoader, imageLoader);
} }