Made use of EquipmentSlots enum

This commit is contained in:
Chomp
2025-01-15 00:04:44 +00:00
parent b6e4dde259
commit 5e79f02cbf
11 changed files with 338 additions and 43 deletions
+18 -2
View File
@@ -1,13 +1,25 @@
using Core.Annotations;
using Core.Annotations;
using Core.Models.Eft.Common.Tables;
using Core.Models.Enums;
using Core.Models.Spt.Config;
using Core.Servers;
namespace Core.Helpers;
[Injectable]
public class BotGeneratorHelper
{
private readonly ConfigServer _configServer;
private readonly PmcConfig _pmcConfig;
public BotGeneratorHelper(
ConfigServer configServer
)
{
_configServer = configServer;
_pmcConfig = _configServer.GetConfig<PmcConfig>(ConfigTypes.PMC);
}
/// <summary>
/// Adds properties to an item
/// e.g. Repairable / HasHinge / Foldable / MaxDurability
@@ -84,7 +96,11 @@ public class BotGeneratorHelper
/// <returns>Equipment role (e.g. pmc / assault / bossTagilla)</returns>
public string GetBotEquipmentRole(string botRole)
{
throw new NotImplementedException();
string[] pmcs = [_pmcConfig.UsecType.ToLower(), _pmcConfig.BearType.ToLower()];
return pmcs.Contains(
botRole.ToLower())
? "pmc"
: botRole;
}
/// <summary>