Skip to content

Commit

Permalink
Added more logging for possible content pack download issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantumrunner committed Dec 28, 2024
1 parent 7b1cea2 commit e3199a7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
13 changes: 12 additions & 1 deletion unity/Assets/Scripts/Content/ContentData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion unity/Assets/Scripts/Content/RemoteContentPack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class RemoteContentPack

public RemoteContentPack(string identifier, Dictionary<string, string> iniData)
{
this.identifier = identifier.ToLower();
this.identifier = identifier;
valid = Populate(iniData);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ private void SetOnlineMode(bool go_online)

DrawOnlineModeButton();

ReloadContentPackList();
ReloadContentPackList();
}

public void ReloadContentPackList()
Expand All @@ -371,17 +371,21 @@ 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;

// quest images
images_list.Clear();

if (co_display != null)
{
StopCoroutine(co_display);
}
}

private void RemoteQuestsListDownload_cb(bool is_available)
Expand Down

0 comments on commit e3199a7

Please sign in to comment.