Added config to not included secure container loot in PMCs - set to false by default

This commit is contained in:
Dev 2024-05-03 21:31:24 +01:00
parent d32d1cb50b
commit 99444c7237
3 changed files with 20 additions and 12 deletions

View File

@ -704,5 +704,6 @@
], ],
"forceHealingItemsIntoSecure": true, "forceHealingItemsIntoSecure": true,
"addPrefixToSameNamePMCAsPlayerChance": 40, "addPrefixToSameNamePMCAsPlayerChance": 40,
"allPMCsHavePlayerNameWithRandomPrefixChance": 1 "allPMCsHavePlayerNameWithRandomPrefixChance": 1,
"addSecureContainerLootFromBotConfig": false
} }

View File

@ -290,6 +290,10 @@ export class BotLootGenerator
); );
// Secure // Secure
// only add if not a pmc or is pmc and flag is true
if (!isPmc || (isPmc && this.pmcConfig.addSecureContainerLootFromBotConfig))
{
this.addLootFromPool( this.addLootFromPool(
this.botLootCacheService.getLootFromCache(botRole, isPmc, LootCacheType.SECURE, botJsonTemplate), this.botLootCacheService.getLootFromCache(botRole, isPmc, LootCacheType.SECURE, botJsonTemplate),
[EquipmentSlots.SECURED_CONTAINER], [EquipmentSlots.SECURED_CONTAINER],
@ -302,6 +306,7 @@ export class BotLootGenerator
containersIdFull, containersIdFull,
); );
} }
}
/** /**
* Get an array of the containers a bot has on them (pockets/backpack/vest) * Get an array of the containers a bot has on them (pockets/backpack/vest)

View File

@ -48,6 +48,8 @@ export interface IPmcConfig extends IBaseConfig
/** Force a number of healing items into PMCs secure container to ensure they can heal */ /** Force a number of healing items into PMCs secure container to ensure they can heal */
forceHealingItemsIntoSecure: boolean; forceHealingItemsIntoSecure: boolean;
allPMCsHavePlayerNameWithRandomPrefixChance: number; allPMCsHavePlayerNameWithRandomPrefixChance: number;
/** Should secure container loot from usec.json/bear.json be added to pmc bots secure */
addSecureContainerLootFromBotConfig: boolean;
} }
export interface PmcTypes export interface PmcTypes