From fb5666c499e0d6fe98423bcb743538c19e55d3a2 Mon Sep 17 00:00:00 2001 From: Yui Date: Mon, 3 Nov 2025 16:00:50 -0300 Subject: [PATCH] feat(mod): load locales and show error on failure --- moe.yuyui.weebsights-port/Mod.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/moe.yuyui.weebsights-port/Mod.cs b/moe.yuyui.weebsights-port/Mod.cs index 4062708..7dbda8c 100644 --- a/moe.yuyui.weebsights-port/Mod.cs +++ b/moe.yuyui.weebsights-port/Mod.cs @@ -1,14 +1,19 @@ -using SPTarkov.DI.Annotations; +using moe.yuyui.weebsights_port.Locales; +using SPTarkov.DI.Annotations; using SPTarkov.Server.Core.DI; using SPTarkov.Server.Core.Models.Utils; namespace moe.yuyui.weebsights_port; [Injectable(TypePriority = OnLoadOrder.PostSptModLoader)] -public class Mod(ISptLogger logger): IOnLoad +public class Mod(ISptLogger logger, EnglishLocale englishLocale): IOnLoad { public Task OnLoad() { + if (!englishLocale.LoadLocales()) + { + logger.Error("[Weeb Iron Sights] Failed to load locales, you may see garbled text"); + } logger.Success("[Weeb Iron Sights] Items loaded successfully"); return Task.CompletedTask; }