refactor(project): renamed project and namespace

This commit is contained in:
Yui
2025-11-04 16:32:31 -03:00
parent a4b2bf4bcf
commit 9e701275ec
11 changed files with 13 additions and 14 deletions

View File

@@ -0,0 +1,29 @@
using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.DI;
using SPTarkov.Server.Core.Models.Common;
using SPTarkov.Server.Core.Utils;
using WeebSights.Models;
namespace WeebSights.Services;
[Injectable(TypePriority = OnLoadOrder.PostDBModLoader + 4)]
public class WeebLocaleService(JsonUtil jsonUtil)
{
public bool TryLoadLocales(string filePath, out Dictionary<MongoId, WeebLocaleConfig> outputObject)
{
var json = LoadLocales(filePath);
if (json == null)
{
outputObject = new Dictionary<MongoId, WeebLocaleConfig>();
return false;
}
outputObject = json;
return true;
}
public Dictionary<MongoId, WeebLocaleConfig>? LoadLocales(string filePath)
{
return jsonUtil.DeserializeFromFile<Dictionary<MongoId, WeebLocaleConfig>>(filePath);
}
}