Implemented: GetKeepAlive, ClearCache, IsMagazine + stubbed out GenerateBot`

This commit is contained in:
Chomp
2025-01-13 16:41:13 +00:00
parent 71f554ed88
commit e35c125e02
4 changed files with 39 additions and 10 deletions
+30 -4
View File
@@ -1,19 +1,45 @@
using Core.Annotations;
using Core.Annotations;
using Core.Generators;
using Core.Helpers;
using Core.Models.Eft.Common.Tables;
using Core.Models.Spt.Bots;
using Props = Core.Models.Eft.Common.Props;
using Core.Utils.Cloners;
using ILogger = Core.Models.Utils.ILogger;
namespace Core.Services;
[Injectable(InjectionType.Singleton)]
public class BotLootCacheService
{
private readonly ILogger _logger;
private readonly ItemHelper _itemHelper;
private readonly PMCLootGenerator _pmcLootGenerator;
private readonly RagfairPriceService _ragfairPriceService;
private readonly ICloner _cloner;
private readonly Dictionary<string, BotLootCache> _lootCache = new();
public BotLootCacheService(
ILogger logger,
ItemHelper itemHelper,
PMCLootGenerator pmcLootGenerator,
RagfairPriceService ragfairPriceService,
ICloner cloner
)
{
_logger = logger;
_itemHelper = itemHelper;
_pmcLootGenerator = pmcLootGenerator;
_ragfairPriceService = ragfairPriceService;
_cloner = cloner;
}
/// <summary>
/// Remove cached bot loot data
/// </summary>
public void ClearCache()
{
throw new NotImplementedException();
_lootCache.Clear();
}
/// <summary>
@@ -76,7 +102,7 @@ public class BotLootCacheService
/// <returns></returns>
protected bool IsMagazine(Props props)
{
throw new NotImplementedException();
return props.ReloadMagType is not null;
}
/// <summary>