Small cleanup of how the pocket pool is gathered
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user