From 1776c8fc15ebf26d54e6ef6ec2e2dce64a7924e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:57:15 -0600 Subject: [PATCH] feat: capture some error --- .vscode/settings.json | 1 + packages/game/JSExport/GameInterface.cs | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 55e0c9534..83a29f18c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -192,6 +192,7 @@ "searchplayers", "searchtanks", "SHAREDEXP", + "Skia", "SKLLD", "sluggify", "smoothstep", diff --git a/packages/game/JSExport/GameInterface.cs b/packages/game/JSExport/GameInterface.cs index a92cc4bdf..e7240b73e 100644 --- a/packages/game/JSExport/GameInterface.cs +++ b/packages/game/JSExport/GameInterface.cs @@ -44,14 +44,20 @@ public class GameInterface if (provider.TryLoadPackageObject(path, out var pda)) { - var bigIcon = pda.Get("BigIcon").Load(); - - Console.WriteLine(bigIcon.Format); - Console.WriteLine(bigIcon.GetType()); - - bigIcon.Decode(ETexturePlatform.DesktopMobile); - - return []; + try + { + return pda.Get("BigIcon") + .Load() + .Decode(ETexturePlatform.DesktopMobile)! + .ToSkBitmap() + .Encode(SkiaSharp.SKEncodedImageFormat.Webp, 80) + .ToArray(); + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } } else {