0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-12 15:50:42 -05:00

Added array to config to allow ignoring of item types from rewards, wired up function in itemFilterService to return values + Added built in inserts to blacklist

This commit is contained in:
Chomp 2024-12-09 14:41:42 +00:00
parent b3683f2f23
commit b41d8683b3
3 changed files with 11 additions and 0 deletions

View File

@ -52,6 +52,7 @@
"66da1b546916142b3b022777",
"670ad7f1ad195290cd00da7a"
],
"rewardItemTypeBlacklist": ["65649eb40bf0ed77b8044453"],
"lootableItemBlacklist": ["660bbc47c38b837877075e47", "660bc341c38b837877075e4c"],
"rewardItemBlacklist": [
"58ac60eb86f77401897560ff",

View File

@ -8,6 +8,8 @@ export interface IItemConfig extends IBaseConfig {
lootableItemBlacklist: string[];
/** items that should not be given as rewards */
rewardItemBlacklist: string[];
/** Item base types that should not be given as rewards */
rewardItemTypeBlacklist: string[];
/** Items that can only be found on bosses */
bossItems: string[];
handbookPriceOverride: Record<string, IHandbookPriceOverride>;

View File

@ -65,6 +65,14 @@ export class ItemFilterService {
return this.cloner.clone(this.itemConfig.rewardItemBlacklist);
}
/**
* Get an array of item types that should never be given as a reward to player
* @returns string array of item base ids
*/
public getItemRewardBaseTypeBlacklist(): string[] {
return this.cloner.clone(this.itemConfig.rewardItemTypeBlacklist);
}
/**
* Return every template id blacklisted in config/item.json
* @returns string array of blacklisted tempalte ids