Log bot role on error

This commit is contained in:
Dev 2023-12-28 00:06:45 +00:00
parent f343871706
commit 06c60b9fd9
2 changed files with 4 additions and 2 deletions

View File

@ -20,7 +20,7 @@
"bot-missing_item_template": "Unable to find item template with tpl: %s", "bot-missing_item_template": "Unable to find item template with tpl: %s",
"bot-missing_saved_match_info": "getBotCap() Unable to get saved match info, falling back to default. Did you restart the server and not the client?", "bot-missing_saved_match_info": "getBotCap() Unable to get saved match info, falling back to default. Did you restart the server and not the client?",
"bot-missing_weapon_preset": "Unable to find preset for weapon with tpl: %s", "bot-missing_weapon_preset": "Unable to find preset for weapon with tpl: %s",
"bot-mod_not_in_slot_filter_list": "Mod: {{modId}} not found in compatible item filter for slot: '{{modSlot}}' for item: {{parentName}}, skipping", "bot-mod_not_in_slot_filter_list": "Mod: {{modId}} not found in compatible item filter for slot: '{{modSlot}}' for item: {{parentName}}, skipping - {{botRole}}",
"bot-mod_slot_missing_from_item": "Slot '{{modSlot}}' does not exist for item: {{parentId}} {{parentName}}", "bot-mod_slot_missing_from_item": "Slot '{{modSlot}}' does not exist for item: {{parentId}} {{parentName}}",
"bot-no_ammo_found_in_bot_json": "Unable to find ammo for bot type: %s", "bot-no_ammo_found_in_bot_json": "Unable to find ammo for bot type: %s",
"bot-no_bot_cap_found_for_location": "No bot location cap limit found for bot: %s, using default", "bot-no_bot_cap_found_for_location": "No bot location cap limit found for bot: %s, using default",

View File

@ -266,7 +266,7 @@ export class BotEquipmentModGenerator
continue; continue;
} }
if (!this.isModValidForSlot(modToAdd, modsParentSlot, modSlot, parentTemplate)) if (!this.isModValidForSlot(modToAdd, modsParentSlot, modSlot, parentTemplate, botRole))
{ {
continue; continue;
} }
@ -792,6 +792,7 @@ export class BotEquipmentModGenerator
* @param itemSlot slot the item will be placed in * @param itemSlot slot the item will be placed in
* @param modSlot slot the mod will fill * @param modSlot slot the mod will fill
* @param parentTemplate template of the mods parent item * @param parentTemplate template of the mods parent item
* @param botRole
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot( protected isModValidForSlot(
@ -799,6 +800,7 @@ export class BotEquipmentModGenerator
itemSlot: Slot, itemSlot: Slot,
modSlot: string, modSlot: string,
parentTemplate: ITemplateItem, parentTemplate: ITemplateItem,
botRole: string
): boolean ): boolean
{ {
// Mod lacks template item // Mod lacks template item