From dd72a6e5e2196a82401ccc12939ff8a81ae4f350 Mon Sep 17 00:00:00 2001 From: Chomp Date: Sun, 5 Sep 2021 12:20:40 +0100 Subject: [PATCH] Naming consistency improvements --- Generator/BotLootGenerator.cs | 20 ++++++++--------- Generator/Helpers/Gear/GearHelpers.cs | 31 +++++++++++++-------------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/Generator/BotLootGenerator.cs b/Generator/BotLootGenerator.cs index 3dd5a0e..f728faf 100644 --- a/Generator/BotLootGenerator.cs +++ b/Generator/BotLootGenerator.cs @@ -47,37 +47,37 @@ namespace Generator return botsWithGear; } - private static void AddPocketLoot(Bot finalBot, Datum bot) + private static void AddPocketLoot(Bot botToUpdate, 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); + botToUpdate.inventory.items.Pockets.AddUnique(lootItem._tpl); } } - private static void AddTacticalVestLoot(Bot finalBot, IEnumerable bots) + private static void AddTacticalVestLoot(Bot botToUpdate, IEnumerable bots) { var tacVestItems = GetItemsStoredInEquipmentItem(bots, "TacticalVest"); - finalBot.inventory.items.TacticalVest.AddRange(tacVestItems); + botToUpdate.inventory.items.TacticalVest.AddRange(tacVestItems); } - private static void AddBackpackLoot(Bot finalBot, IEnumerable bots) + private static void AddBackpackLoot(Bot botToUpdate, IEnumerable bots) { // add generic keys to bosses - if (finalBot.botType.IsBoss()) + if (botToUpdate.botType.IsBoss()) { - finalBot.inventory.items.Backpack.AddRange(SpecialLootHelper.GetGenericBossKeys()); + botToUpdate.inventory.items.Backpack.AddRange(SpecialLootHelper.GetGenericBossKeys()); } var backpackItems = GetItemsStoredInEquipmentItem(bots, "Backpack"); - finalBot.inventory.items.Backpack.AddRange(backpackItems); + botToUpdate.inventory.items.Backpack.AddRange(backpackItems); } - private static void AddSecureContainerLoot(Bot finalAssaultBot, IEnumerable bots) + private static void AddSecureContainerLoot(Bot botToUpdate, IEnumerable bots) { var tacVestItems = GetItemsStoredInEquipmentItem(bots, "SecuredContainer"); - finalAssaultBot.inventory.items.SecuredContainer.AddRange(tacVestItems); + botToUpdate.inventory.items.SecuredContainer.AddRange(tacVestItems); } private static void AddSpecialLoot(Bot botToUpdate) diff --git a/Generator/Helpers/Gear/GearHelpers.cs b/Generator/Helpers/Gear/GearHelpers.cs index 65f86b2..ff4a1e9 100644 --- a/Generator/Helpers/Gear/GearHelpers.cs +++ b/Generator/Helpers/Gear/GearHelpers.cs @@ -33,7 +33,7 @@ namespace Generator.Helpers.Gear botToUpdate.inventory.mods = itemsWithModsDictionary; } - public static void AddEquippedGear(Bot finalAssaultBot, Datum bot) + public static void AddEquippedGear(Bot botToUpdate, Datum bot) { // add equipped gear foreach (var inventoryItem in bot.Inventory.items) @@ -41,46 +41,46 @@ namespace Generator.Helpers.Gear switch (inventoryItem.slotId?.ToLower()) { case "headwear": - finalAssaultBot.inventory.equipment.Headwear.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.Headwear.AddUnique(inventoryItem._tpl); break; case "earpiece": - finalAssaultBot.inventory.equipment.Earpiece.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.Earpiece.AddUnique(inventoryItem._tpl); break; case "facecover": - finalAssaultBot.inventory.equipment.FaceCover.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.FaceCover.AddUnique(inventoryItem._tpl); break; case "armorvest": - finalAssaultBot.inventory.equipment.ArmorVest.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.ArmorVest.AddUnique(inventoryItem._tpl); break; case "eyewear": - finalAssaultBot.inventory.equipment.Eyewear.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.Eyewear.AddUnique(inventoryItem._tpl); break; case "armband": - finalAssaultBot.inventory.equipment.ArmBand.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.ArmBand.AddUnique(inventoryItem._tpl); break; case "tacticalvest": - finalAssaultBot.inventory.equipment.TacticalVest.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.TacticalVest.AddUnique(inventoryItem._tpl); break; case "backpack": - finalAssaultBot.inventory.equipment.Backpack.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.Backpack.AddUnique(inventoryItem._tpl); break; case "firstprimaryweapon": - finalAssaultBot.inventory.equipment.FirstPrimaryWeapon.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.FirstPrimaryWeapon.AddUnique(inventoryItem._tpl); break; case "secondprimaryweapon": - finalAssaultBot.inventory.equipment.SecondPrimaryWeapon.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.SecondPrimaryWeapon.AddUnique(inventoryItem._tpl); break; case "holster": - finalAssaultBot.inventory.equipment.Holster.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.Holster.AddUnique(inventoryItem._tpl); break; case "scabbard": - finalAssaultBot.inventory.equipment.Scabbard.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.Scabbard.AddUnique(inventoryItem._tpl); break; case "pockets": - finalAssaultBot.inventory.equipment.Pockets.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.Pockets.AddUnique(inventoryItem._tpl); break; case "securedcontainer": - finalAssaultBot.inventory.equipment.SecuredContainer.AddUnique(inventoryItem._tpl); + botToUpdate.inventory.equipment.SecuredContainer.AddUnique(inventoryItem._tpl); break; default: break; @@ -199,6 +199,5 @@ namespace Generator.Helpers.Gear return itemsThatTakeCartridgesDict; } - } }