fix(mod): fixed profiles being corrupted after restart

This commit is contained in:
Yui
2025-11-05 16:17:04 -03:00
parent 99f0a2a3c9
commit 2267e1078e
2 changed files with 2 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ using WeebSights.Services;
namespace WeebSights;
[Injectable(TypePriority = OnLoadOrder.PostSptModLoader + 1)]
[Injectable(TypePriority = OnLoadOrder.PostDBModLoader + 1)]
public class Mod(ISptLogger<Mod> logger,
WeebItemService weebItemService,
WeebTraderService weebTraderService,
@@ -18,7 +18,6 @@ public class Mod(ISptLogger<Mod> logger,
{
var stopWatch = Stopwatch.StartNew();
var currentAssemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
logger.Info($"[Weeb Iron Sights] Loaded in {currentAssemblyPath}");
if (!weebLocaleService.TryLoadLocales(Path.Join(currentAssemblyPath, "/db/locales/en.json"), out var locales))
{
logger.Error("[Weeb Iron Sights] Failed to load locales. Names might be weird");

View File

@@ -6,7 +6,7 @@ using WeebSights.Models;
namespace WeebSights.Services;
[Injectable(TypePriority = OnLoadOrder.PostDBModLoader + 4)]
[Injectable]
public class WeebLocaleService(JsonUtil jsonUtil)
{
public bool TryLoadLocales(string filePath, out Dictionary<MongoId, WeebLocaleConfig> outputObject)