Small cleanup of how the pocket pool is gathered

This commit is contained in:
Chomp
2025-01-27 08:36:38 +00:00
parent d86865784b
commit 1f74ebc920
@@ -213,11 +213,8 @@ public class BotInventoryGenerator(
new GenerateEquipmentProperties
{
RootEquipmentSlot = EquipmentSlots.Pockets,
// Unheard profiles have unique sized pockets, TODO - handle this somewhere else in a better way
RootEquipmentPool =
chosenGameVersion == GameEditions.UNHEARD
? new Dictionary<string, double> { [ItemTpl.POCKETS_1X4_TUE] = 1 }
: templateInventory.Equipment[EquipmentSlots.Pockets],
// Unheard profiles have unique sized pockets
RootEquipmentPool = GetPocketPoolByGameEdition(chosenGameVersion, templateInventory),
ModPool = templateInventory.Mods,
SpawnChances = wornItemChances,
BotData = new BotData { Role = botRole, Level = botLevel, EquipmentRole = botEquipmentRole },
@@ -325,6 +322,13 @@ public class BotInventoryGenerator(
);
}
protected Dictionary<string, double> GetPocketPoolByGameEdition(string chosenGameVersion, BotTypeInventory templateInventory)
{
return chosenGameVersion == GameEditions.UNHEARD
? new Dictionary<string, double> { [ItemTpl.POCKETS_1X4_TUE] = 1 }
: templateInventory.Equipment.GetValueOrDefault(EquipmentSlots.Pockets);
}
/// <summary>
/// Remove non-armored rigs from parameter data
/// </summary>