Add property to ragfair blacklist to toggle removal of damaged ammo packs

This commit is contained in:
Dev 2023-06-30 14:00:08 +01:00
parent 263e5c8dd5
commit 343be66806
3 changed files with 10 additions and 0 deletions

View File

@ -145,6 +145,7 @@
],
"removeSeasonalItemsWhenNotInEvent": true,
"blacklist": {
"damagedAmmoPacks": true,
"custom": [],
"enableBsgList": true,
"enableQuestList": true,

View File

@ -2,6 +2,7 @@ import { inject, injectable } from "tsyringe";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { BaseClasses } from "../models/enums/BaseClasses";
import { ConfigTypes } from "../models/enums/ConfigTypes";
import { MemberCategory } from "../models/enums/MemberCategory";
import { MessageType } from "../models/enums/MessageType";
@ -87,6 +88,12 @@ export class RagfairServerHelper
return false;
}
// Don't include damaged ammo packs
if (this.ragfairConfig.dynamic.blacklist.damagedAmmoPacks && itemDetails[1]._parent === BaseClasses.AMMO_BOX && itemDetails[1]._name.includes("_damaged"))
{
return false;
}
return true;
}

View File

@ -129,6 +129,8 @@ export interface Condition
export interface Blacklist
{
/** Damaged ammo packs */
damagedAmmoPacks: boolean
/** Custom blacklist for item Tpls */
custom: string[]
/** BSG blacklist a large number of items from flea, true = use blacklist */