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;
}
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<Datum> bots)
private static void AddTacticalVestLoot(Bot botToUpdate, IEnumerable<Datum> 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<Datum> bots)
private static void AddBackpackLoot(Bot botToUpdate, IEnumerable<Datum> 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<Datum> bots)
private static void AddSecureContainerLoot(Bot botToUpdate, IEnumerable<Datum> bots)
{
var tacVestItems = GetItemsStoredInEquipmentItem(bots, "SecuredContainer");
finalAssaultBot.inventory.items.SecuredContainer.AddRange(tacVestItems);
botToUpdate.inventory.items.SecuredContainer.AddRange(tacVestItems);
}
private static void AddSpecialLoot(Bot botToUpdate)

View File

@ -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;
}
}
}