Create centralised reward blacklist

This commit is contained in:
Dev 2024-03-23 10:42:43 +00:00
parent 02ce8f24b8
commit cf490c841e
3 changed files with 63 additions and 2 deletions

View File

@ -63,6 +63,47 @@
"5580239d4bdc2de7118b4583"
],
"rewardItemBlacklist": [
"5e997f0b86f7741ac73993e2",
"5b44abe986f774283e2e3512",
"5e99711486f7744bfc4af328",
"5e99735686f7744bfc4af32c",
"6087e570b998180e9f76dc24",
"5d52d479a4b936793d58c76b",
"5e85aac65505fa48730d8af2",
"63495c500c297e20065a08b1",
"5cde8864d7f00c0010373be1",
"5b3b713c5acfc4330140bd8d",
"60c080eb991ac167ad1c3ad4",
"6389c7f115805221fb410466",
"64d0b40fbe2eed70e254e2d4",
"6389c88b33a719183c7f63b6",
"57cd379a24597778e7682ecf",
"5fc64ea372b0dd78d51159dc",
"5c0e842486f77443a74d2976",
"5c0e874186f7745dc7616606",
"5c0e541586f7747fa54205c9",
"63626d904aa74b8fe30ab426",
"6275303a9f372d6ea97f9ec7",
"628bc7fb408e2b2e9c0801b1",
"5ede4739e0350d05467f73e8",
"5ede47405b097655935d7d16",
"5ede474b0c226a66f5402622",
"5ede475339ee016e8c534742",
"5ede475b549eed7c6d5c18fb",
"62e910aaf957f2915e0a5e36",
"619bc61e86e01e16f839a999",
"619bddc6c9546643a67df6ee",
"6241c316234b593b5676b637",
"5d70e500a4b9364de70d38ce",
"619bde3dc9546643a67df6f2",
"619bdeb986e01e16f839a99e",
"619bddffc9546643a67df6f0",
"619bdf9cc9546643a67df6f8",
"63a0b2eabea67a6d93009e52",
"5d2f2ab648f03550091993ca",
"5cde8864d7f00c0010373be1"
],
"bossItems": [
"6275303a9f372d6ea97f9ec7",
"62a61bbf8ec41a51b34758d2",
@ -90,8 +131,7 @@
"63611865ba5b90db0c0399d1",
"5eff09cd30a7dc22fd1ddfed",
"5efde6b4f5448336730dbd61",
"609e860ebd219504d8507525",
"63626d904aa74b8fe30ab426"
"609e860ebd219504d8507525"
],
"handbookPriceOverride": {
"63a8970d7108f713591149f5": 1000,

View File

@ -5,6 +5,8 @@ export interface IItemConfig extends IBaseConfig
kind: "aki-item";
/** Items that should be globally blacklisted */
blacklist: string[];
/** items that should not be given as rewards */
rewardItemBlacklist: string[];
/** Items that can only be found on bosses */
bossItems: string[];
handbookPriceOverride: Record<string, number>;

View File

@ -31,6 +31,25 @@ export class ItemFilterService
return this.itemConfig.blacklist.includes(tpl);
}
/**
* Check if item is blacklisted from being a reward for player
* @param tpl item tpl to check is on blacklist
* @returns True when blacklisted
*/
public isItemRewardBlacklisted(tpl: string): boolean
{
return this.itemConfig.rewardItemBlacklist.includes(tpl);
}
/**
* Get an array of items that should never be given as a reward to player
* @returns string array of item tpls
*/
public getItemRewardBlacklist(): string[]
{
return this.itemConfig.rewardItemBlacklist;
}
/**
* Return every template id blacklisted in config/item.json
* @returns string array of blacklisted tempalte ids