Naming consistency improvements

This commit is contained in:
Chomp 2021-09-05 12:20:40 +01:00
parent 611090ec07
commit dd72a6e5e2
2 changed files with 25 additions and 26 deletions

View File

@ -47,37 +47,37 @@ namespace Generator
return botsWithGear; return botsWithGear;
} }
private static void AddPocketLoot(Bot finalBot, Datum bot) private static void AddPocketLoot(Bot botToUpdate, Datum bot)
{ {
// pocket loot // pocket loot
foreach (var lootItem in bot.Inventory.items.Where(x => x?.slotId?.StartsWith("pocket") == true)) 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<Datum> bots) private static void AddTacticalVestLoot(Bot botToUpdate, IEnumerable<Datum> bots)
{ {
var tacVestItems = GetItemsStoredInEquipmentItem(bots, "TacticalVest"); var tacVestItems = GetItemsStoredInEquipmentItem(bots, "TacticalVest");
finalBot.inventory.items.TacticalVest.AddRange(tacVestItems); botToUpdate.inventory.items.TacticalVest.AddRange(tacVestItems);
} }
private static void AddBackpackLoot(Bot finalBot, IEnumerable<Datum> bots) private static void AddBackpackLoot(Bot botToUpdate, IEnumerable<Datum> bots)
{ {
// add generic keys to bosses // 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"); var backpackItems = GetItemsStoredInEquipmentItem(bots, "Backpack");
finalBot.inventory.items.Backpack.AddRange(backpackItems); botToUpdate.inventory.items.Backpack.AddRange(backpackItems);
} }
private static void AddSecureContainerLoot(Bot finalAssaultBot, IEnumerable<Datum> bots) private static void AddSecureContainerLoot(Bot botToUpdate, IEnumerable<Datum> bots)
{ {
var tacVestItems = GetItemsStoredInEquipmentItem(bots, "SecuredContainer"); var tacVestItems = GetItemsStoredInEquipmentItem(bots, "SecuredContainer");
finalAssaultBot.inventory.items.SecuredContainer.AddRange(tacVestItems); botToUpdate.inventory.items.SecuredContainer.AddRange(tacVestItems);
} }
private static void AddSpecialLoot(Bot botToUpdate) private static void AddSpecialLoot(Bot botToUpdate)

View File

@ -33,7 +33,7 @@ namespace Generator.Helpers.Gear
botToUpdate.inventory.mods = itemsWithModsDictionary; botToUpdate.inventory.mods = itemsWithModsDictionary;
} }
public static void AddEquippedGear(Bot finalAssaultBot, Datum bot) public static void AddEquippedGear(Bot botToUpdate, Datum bot)
{ {
// add equipped gear // add equipped gear
foreach (var inventoryItem in bot.Inventory.items) foreach (var inventoryItem in bot.Inventory.items)
@ -41,46 +41,46 @@ namespace Generator.Helpers.Gear
switch (inventoryItem.slotId?.ToLower()) switch (inventoryItem.slotId?.ToLower())
{ {
case "headwear": case "headwear":
finalAssaultBot.inventory.equipment.Headwear.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.Headwear.AddUnique(inventoryItem._tpl);
break; break;
case "earpiece": case "earpiece":
finalAssaultBot.inventory.equipment.Earpiece.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.Earpiece.AddUnique(inventoryItem._tpl);
break; break;
case "facecover": case "facecover":
finalAssaultBot.inventory.equipment.FaceCover.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.FaceCover.AddUnique(inventoryItem._tpl);
break; break;
case "armorvest": case "armorvest":
finalAssaultBot.inventory.equipment.ArmorVest.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.ArmorVest.AddUnique(inventoryItem._tpl);
break; break;
case "eyewear": case "eyewear":
finalAssaultBot.inventory.equipment.Eyewear.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.Eyewear.AddUnique(inventoryItem._tpl);
break; break;
case "armband": case "armband":
finalAssaultBot.inventory.equipment.ArmBand.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.ArmBand.AddUnique(inventoryItem._tpl);
break; break;
case "tacticalvest": case "tacticalvest":
finalAssaultBot.inventory.equipment.TacticalVest.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.TacticalVest.AddUnique(inventoryItem._tpl);
break; break;
case "backpack": case "backpack":
finalAssaultBot.inventory.equipment.Backpack.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.Backpack.AddUnique(inventoryItem._tpl);
break; break;
case "firstprimaryweapon": case "firstprimaryweapon":
finalAssaultBot.inventory.equipment.FirstPrimaryWeapon.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.FirstPrimaryWeapon.AddUnique(inventoryItem._tpl);
break; break;
case "secondprimaryweapon": case "secondprimaryweapon":
finalAssaultBot.inventory.equipment.SecondPrimaryWeapon.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.SecondPrimaryWeapon.AddUnique(inventoryItem._tpl);
break; break;
case "holster": case "holster":
finalAssaultBot.inventory.equipment.Holster.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.Holster.AddUnique(inventoryItem._tpl);
break; break;
case "scabbard": case "scabbard":
finalAssaultBot.inventory.equipment.Scabbard.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.Scabbard.AddUnique(inventoryItem._tpl);
break; break;
case "pockets": case "pockets":
finalAssaultBot.inventory.equipment.Pockets.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.Pockets.AddUnique(inventoryItem._tpl);
break; break;
case "securedcontainer": case "securedcontainer":
finalAssaultBot.inventory.equipment.SecuredContainer.AddUnique(inventoryItem._tpl); botToUpdate.inventory.equipment.SecuredContainer.AddUnique(inventoryItem._tpl);
break; break;
default: default:
break; break;
@ -199,6 +199,5 @@ namespace Generator.Helpers.Gear
return itemsThatTakeCartridgesDict; return itemsThatTakeCartridgesDict;
} }
} }
} }