This commit is contained in:
JohnCorby 2023-04-24 19:12:32 -07:00
parent b19478d7e7
commit ca0c93177f

View File

@ -33,7 +33,7 @@ namespace NewHorizons.Utility.Files
{
// Copied from OWML but without the print statement lol
var path = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, filename);
var key = path.Substring(0, Main.Instance.ModHelper.OwmlConfig.ModsPath.Length);
var key = path.Substring(Main.Instance.ModHelper.OwmlConfig.ModsPath.Length);
if (_loadedTextures.TryGetValue(key, out var existingTexture))
{
NHLogger.LogVerbose($"Already loaded image at path: {path}");
@ -433,7 +433,7 @@ namespace NewHorizons.Utility.Files
IEnumerator DownloadTexture(string url, int index)
{
var key = url.Substring(0, Main.Instance.ModHelper.OwmlConfig.ModsPath.Length);
var key = url.Substring(Main.Instance.ModHelper.OwmlConfig.ModsPath.Length);
lock (_loadedTextures)
{
if (_loadedTextures.TryGetValue(key, out var existingTexture))