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,17 +290,22 @@ export class BotLootGenerator
); );
// Secure // Secure
this.addLootFromPool(
this.botLootCacheService.getLootFromCache(botRole, isPmc, LootCacheType.SECURE, botJsonTemplate), // only add if not a pmc or is pmc and flag is true
[EquipmentSlots.SECURED_CONTAINER], if (!isPmc || (isPmc && this.pmcConfig.addSecureContainerLootFromBotConfig))
50, {
botInventory, this.addLootFromPool(
botRole, this.botLootCacheService.getLootFromCache(botRole, isPmc, LootCacheType.SECURE, botJsonTemplate),
null, [EquipmentSlots.SECURED_CONTAINER],
-1, 50,
isPmc, botInventory,
containersIdFull, botRole,
); null,
-1,
isPmc,
containersIdFull,
);
}
} }
/** /**

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