Linked searches on empty equipment slots; better offerlist expanding
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "uifixes",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Tyfon",
|
||||
|
@@ -20,7 +20,21 @@ export class RagfairLinkedSlotItemService extends RagfairLinkedItemService {
|
||||
|
||||
if (slotName) {
|
||||
this.logger.info(`UIFixes: Finding items for specific slot ${tpl}:${slotName}`);
|
||||
return this.getSpecificFilter(this.databaseService.getItems()[tpl], slotName);
|
||||
|
||||
const resultSet = this.getSpecificFilter(this.databaseService.getItems()[tpl], slotName);
|
||||
|
||||
// Default Inventory, for equipment slots
|
||||
if (tpl === "55d7217a4bdc2d86028b456d") {
|
||||
const categories = [...resultSet];
|
||||
const items = Object.keys(this.databaseService.getItems()).filter(tpl =>
|
||||
this.itemHelper.isOfBaseclasses(tpl, categories)
|
||||
);
|
||||
|
||||
// Send the categories along too, some of them might actually be items
|
||||
return new Set(items.concat(categories));
|
||||
}
|
||||
|
||||
return resultSet;
|
||||
}
|
||||
|
||||
return super.getLinkedItems(tpl);
|
||||
@@ -42,4 +56,6 @@ export class RagfairLinkedSlotItemService extends RagfairLinkedItemService {
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
private getCategoryItems(category: string) {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user