diff --git a/unity/Assets/Scripts/Content/ContentData.cs b/unity/Assets/Scripts/Content/ContentData.cs index 20d0f93f..9ba94147 100644 --- a/unity/Assets/Scripts/Content/ContentData.cs +++ b/unity/Assets/Scripts/Content/ContentData.cs @@ -279,12 +279,23 @@ private static ContentPack GetPackData(string path, string gameTypeName, bool ch // Some packs have a type string type = d.Get("ContentPack", "type"); - if (!checkGameType || type.StartsWith(gameTypeName)) + if ( + !checkGameType || + ( + !string.IsNullOrWhiteSpace(gameTypeName) + && type.StartsWith(gameTypeName) + ) + ) { var pack = GetContentPack(path, d, type); + if(pack == null) + { + ValkyrieDebug.Log("Could not find content pack file: " + path + $"Please check if type=\"{gameTypeName}\" was set correctly in content_pack.ini file."); + } return pack; } + ValkyrieDebug.Log("Could not find content pack file: " + path); return null; } diff --git a/unity/Assets/Scripts/Content/RemoteContentPack.cs b/unity/Assets/Scripts/Content/RemoteContentPack.cs index 57ef3aaf..1f0081a8 100644 --- a/unity/Assets/Scripts/Content/RemoteContentPack.cs +++ b/unity/Assets/Scripts/Content/RemoteContentPack.cs @@ -27,7 +27,7 @@ public class RemoteContentPack public RemoteContentPack(string identifier, Dictionary iniData) { - this.identifier = identifier.ToLower(); + this.identifier = identifier; valid = Populate(iniData); } diff --git a/unity/Assets/Scripts/UI/Screens/ContentSelectDownloadScreen.cs b/unity/Assets/Scripts/UI/Screens/ContentSelectDownloadScreen.cs index 9be50b85..b98f496b 100644 --- a/unity/Assets/Scripts/UI/Screens/ContentSelectDownloadScreen.cs +++ b/unity/Assets/Scripts/UI/Screens/ContentSelectDownloadScreen.cs @@ -356,7 +356,7 @@ private void SetOnlineMode(bool go_online) DrawOnlineModeButton(); - ReloadContentPackList(); + ReloadContentPackList(); } public void ReloadContentPackList() @@ -371,9 +371,11 @@ public void ReloadContentPackList() public void CleanContentPackList() { - // Clean up everything marked as 'questlist' + // Clean up everything marked as 'CONTENTPACKLIST' foreach (GameObject go in GameObject.FindGameObjectsWithTag(Game.CONTENTPACKLIST)) + { Destroy(go); + } scrollArea = null; @@ -381,7 +383,9 @@ public void CleanContentPackList() images_list.Clear(); if (co_display != null) + { StopCoroutine(co_display); + } } private void RemoteQuestsListDownload_cb(bool is_available)