Fix for DiscardItem and ItemRestrictions features.
This commit is contained in:
parent
065c5098b9
commit
de120ff607
16
src/items.ts
16
src/items.ts
@ -101,7 +101,7 @@ export class Items
|
||||
this.logger.info(`Euro Max Stack set to ${this.modConfig.eurosMaxStack}`, true);
|
||||
}
|
||||
|
||||
// Remove ExcludedFilter Restrictions from all items.
|
||||
// Remove ExcludedFilter Restrictions from all items. Push into Filters numerous Node categories.
|
||||
if (this.modConfig.removeItemRestrictions)
|
||||
{
|
||||
this.removeItemRestrictions();
|
||||
@ -158,9 +158,10 @@ export class Items
|
||||
for (const j in grid._props.filters)
|
||||
{
|
||||
const filters = grid._props.filters[j];
|
||||
if (filters != [] && filters.ExcludedFilter != [])
|
||||
if (filters.ExcludedFilter != [])
|
||||
{
|
||||
filters.ExcludedFilter = [];
|
||||
filters.Filter.concat(..."5448e54d4bdc2dcc718b4568", "55802f3e4bdc2de7118b4584", "5448fe124bdc2da5018b4567", "543be5664bdc2dd4348b4569", "5447e0e74bdc2d3c308b4567", "543be6674bdc2df1348b4569", "5645bcb74bdc2ded0b8b4578", "550aa4154bdc2dd8348b456b", "5448e53e4bdc2d60728b4567", "5422acb9af1c889c16000029", "5a341c4086f77401f2541505", "5795f317245977243854e041", "5448bf274bdc2dfc2f8b456a");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -213,9 +214,14 @@ export class Items
|
||||
|
||||
private removeDiscardLimit(): void
|
||||
{
|
||||
for (const item in this.items)
|
||||
for (const itemId in this.items)
|
||||
{
|
||||
this.items[item]._props.DiscardLimit = 0;
|
||||
if (this.items[itemId]._type === "Node" || !this.items[itemId]._props?.DiscardLimit)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
this.items[itemId]._props.DiscardLimit = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user