diff --git a/Libraries/Core/Generators/BotGenerator.cs b/Libraries/Core/Generators/BotGenerator.cs index 2909f095..1203f1bd 100644 --- a/Libraries/Core/Generators/BotGenerator.cs +++ b/Libraries/Core/Generators/BotGenerator.cs @@ -243,7 +243,7 @@ public class BotGenerator( botGenerationDetails.BotDifficulty, botGenerationDetails.Role ); - bot.Info.Settings.AggressorBonus = GetAgressorBonusByDifficulty( + bot.Info.Settings.AggressorBonus = GetAggressorBonusByDifficulty( botJsonTemplate.BotExperience.StandingForKill, botGenerationDetails.BotDifficulty, botGenerationDetails.Role @@ -334,7 +334,7 @@ public class BotGenerator( /// /// Get the standing value change when player kills a bot /// - /// Dictionary of standing values keyed by bot difficulty + /// Dictionary of standing values keyed by bot difficulty /// Difficulty of bot to look up /// Role of bot (optional, used for error logging) /// Standing change value @@ -351,13 +351,13 @@ public class BotGenerator( } /// - /// Get the agressor bonus value when player kills a bot + /// Get the aggressor bonus value when player kills a bot /// - /// Dictionary of standing values keyed by bot difficulty + /// Dictionary of standing values keyed by bot difficulty /// Difficulty of bot to look up /// Role of bot (optional, used for error logging) /// Standing change value - public double GetAgressorBonusByDifficulty(Dictionary aggressorBonuses, string botDifficulty, string role) + public double GetAggressorBonusByDifficulty(Dictionary aggressorBonuses, string botDifficulty, string role) { if (!aggressorBonuses.TryGetValue(botDifficulty.ToLower(), out var result)) { @@ -400,7 +400,7 @@ public class BotGenerator( } /// - /// TODO: Complete Summary + /// Unheard PMCs need their pockets expanded /// /// Bot data to adjust public void AddAdditionalPocketLootWeightsForUnheardBot(BotType botJsonTemplate) @@ -473,25 +473,6 @@ public class BotGenerator( : _weightedRandomHelper.GetWeightedValue(appearance.Hands); // Hands can be random, choose any from weighted dict } - /// - /// Log the number of PMCs generated to the debug console - /// - /// Generated bot array, ready to send to client - public void LogPmcGeneratedCount(List output) - { - var pmcCount = output.Aggregate( - 0, - (acc, cur) => - { - return cur.Info.Side is "Bear" or "Usec" ? acc + 1 : acc; - } - ); - if (_logger.IsLogEnabled(LogLevel.Debug)) - { - _logger.Debug($"Generated {output.Count} total bots. Replaced {pmcCount} with PMCs"); - } - } - /// /// Converts health object to the required format /// @@ -602,7 +583,7 @@ public class BotGenerator( } /// - /// Sum up body parts max hp values, return the bodyPart collection with lowest value + /// Sum up body parts max hp values, return the bodyPart collection with the lowest value /// /// Body parts to sum up /// Lowest hp collection @@ -638,7 +619,7 @@ public class BotGenerator( } /// - /// Get a bots skills with randomsied progress value between the min and max values + /// Get a bots skills with randomised progress value between the min and max values /// /// Skills that should have their progress value randomised /// Skills @@ -844,17 +825,4 @@ public class BotGenerator( return ItemTpl.BARTER_DOGTAG_BEAR; } } - - /// - /// Adjust a PMCs pocket tpl to UHD if necessary, otherwise do nothing - /// - /// Pmc object to adjust - public void SetPmcPocketsByGameVersion(BotBase bot) - { - if (bot.Info.GameVersion == GameEditions.UNHEARD) - { - var pockets = bot.Inventory.Items.FirstOrDefault(item => item.SlotId == "Pockets"); - pockets.Template = ItemTpl.POCKETS_1X4_TUE; - } - } } diff --git a/Libraries/Core/Generators/BotInventoryGenerator.cs b/Libraries/Core/Generators/BotInventoryGenerator.cs index e7283c69..0ece9d96 100644 --- a/Libraries/Core/Generators/BotInventoryGenerator.cs +++ b/Libraries/Core/Generators/BotInventoryGenerator.cs @@ -12,7 +12,6 @@ using Core.Utils; using SptCommon.Annotations; using LogLevel = Core.Models.Spt.Logging.LogLevel; - namespace Core.Generators; [Injectable] @@ -383,6 +382,13 @@ public class BotInventoryGenerator( ); } + /// + /// Get RootEquipmentPool id based on game version + /// + /// + /// + /// is bot a PMC + /// protected Dictionary GetPocketPoolByGameEdition(string chosenGameVersion, BotTypeInventory templateInventory, bool isPmc) { return chosenGameVersion == GameEditions.UNHEARD && isPmc