diff --git a/Generator/BotLootGenerator.cs b/Generator/BotLootGenerator.cs index 2a249da..be80551 100644 --- a/Generator/BotLootGenerator.cs +++ b/Generator/BotLootGenerator.cs @@ -1,6 +1,7 @@ using Common; using Common.Extensions; using Generator.Helpers; +using Generator.Helpers.Gear; using Generator.Models.Input; using Generator.Models.Output; using System; @@ -46,6 +47,7 @@ namespace Generator AddTacticalVestLoot(botToUpdate, rawBotsOfSameType); AddBackbackLoot(botToUpdate, rawBotsOfSameType); AddSecureContainerLoot(botToUpdate, rawBotsOfSameType); + AddSpecialLoot(botToUpdate); } stopwatch.Stop(); @@ -54,6 +56,15 @@ namespace Generator return _botsWithGear; } + private void AddPocketLoot(Bot finalBot, Datum bot) + { + // pocket loot + foreach (var lootItem in bot.Inventory.items.Where(x => x?.slotId?.StartsWith("pocket") == true)) + { + finalBot.inventory.items.Pockets.AddUnique(lootItem._tpl); + } + } + private void AddTacticalVestLoot(Bot finalAssaultBot, List bots) { var tacVestItems = GetItemsStoredInEquipmentItem(bots, "TacticalVest"); @@ -72,13 +83,9 @@ namespace Generator finalAssaultBot.inventory.items.SecuredContainer.AddRange(tacVestItems); } - private void AddPocketLoot(Bot finalBot, Datum bot) + private void AddSpecialLoot(Bot botToUpdate) { - // pocket loot - foreach (var lootItem in bot.Inventory.items.Where(x => x?.slotId?.StartsWith("pocket") == true)) - { - finalBot.inventory.items.Pockets.AddUnique(lootItem._tpl); - } + botToUpdate.specialLoot.AddRange(SpecialLootHelper.GetSpecialLootForBotType(botToUpdate.botType)); } private List GetItemsStoredInEquipmentItem(List bots, string containerName) diff --git a/Generator/Helpers/Gear/SpecialLootHelper.cs b/Generator/Helpers/Gear/SpecialLootHelper.cs new file mode 100644 index 0000000..d5a2b1d --- /dev/null +++ b/Generator/Helpers/Gear/SpecialLootHelper.cs @@ -0,0 +1,64 @@ +using Generator.Models; +using System.Collections.Generic; + +namespace Generator.Helpers.Gear +{ + public static class SpecialLootHelper + { + public static IEnumerable GetSpecialLootForBotType(BotType botType) + { + var results = new List(); + switch (botType) + { + case BotType.assault: + break; + case BotType.pmcBot: + break; + case BotType.marksman: + break; + case BotType.bossbully: + break; + case BotType.bossgluhar: + break; + case BotType.bosskilla: + break; + case BotType.bosskojaniy: + results.Add("5d08d21286f774736e7c94c3"); // Shturman's stash key + break; + case BotType.bosssanitar: + results.Add("5efde6b4f5448336730dbd61"); // Keycard with a blue marking + break; + case BotType.bossstormtrooper: + break; + case BotType.followerbully: + break; + case BotType.followergluharassault: + break; + case BotType.followergluharscout: + break; + case BotType.followergluharsecurity: + break; + case BotType.followergluharsnipe: + break; + case BotType.followerkojaniy: + break; + case BotType.followersanitar: + break; + case BotType.followerstormtrooper: + break; + case BotType.cursedassault: + break; + case BotType.sectantpriest: + break; + case BotType.sectantwarrior: + break; + case BotType.usec: + break; + default: + break; + } + + return results; + } + } +} diff --git a/Generator/Models/Output/Output.cs b/Generator/Models/Output/Output.cs index 0b4f522..5b9df25 100644 --- a/Generator/Models/Output/Output.cs +++ b/Generator/Models/Output/Output.cs @@ -13,6 +13,7 @@ namespace Generator.Models.Output health = new Health(); skills = new Skills(); inventory = new Inventory(); + specialLoot = new List(); firstName = new List(); lastName = new List(); difficulty = new Difficulty.Difficulty(); @@ -27,6 +28,7 @@ namespace Generator.Models.Output public Health health { get; set; } public Skills skills { get; set; } public Inventory inventory { get; set; } + public List specialLoot { get; set; } public List firstName { get; set; } public List lastName { get; set; } public Difficulty.Difficulty difficulty { get; set;}