Make icon cache save to disk

This commit is contained in:
2026-01-24 20:08:42 -07:00
parent 44b594a7f2
commit 8b69294674
6 changed files with 182 additions and 67 deletions

View File

@@ -166,8 +166,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
{
GameObject newIcon = Instantiate(sample, content.transform);
newIcon.name = "IconEntry";
var (d, h) = Tools.FixIconData(entry.Data);
if (d != null && h != null && Tools.Sha512Sum(Convert.FromBase64String(d)) == h) Tools.RenderFromBase64(d, newIcon.transform.GetChild(0).GetChild(0).GetComponent<Image>());
Tools.RenderFromBase64(entry.Data, newIcon.transform.GetChild(0).GetChild(0).GetComponent<Image>());
newIcon.transform.GetChild(1).GetComponent<TMP_Text>().text = "Bird Name: " + entry.Name;
newIcon.transform.GetChild(2).GetComponent<TMP_Text>().text = "Price " + Tools.FormatWithCommas(entry.Price) + " coins";
newIcon.transform.GetChild(3).GetComponent<TMP_Text>().text = "Designer Name: " + entry.CreatorUsername;