4,581
edits
m (Added newlines for equipment template to make it easier to sift through the results) |
m (Swapped version and disam templates in script) |
||
Line 26: | Line 26: | ||
let results = []; | let results = []; | ||
if (returnEquipmentTemplate) results.push(`{{V|${gameVersion.substr(1)}}}\n\n{{EquipmentTableFromList`); | if (returnEquipmentTemplate) results.push(`{{V|${gameVersion.substr(1)}}}\n\n{{EquipmentTableFromList`); | ||
if (!returnEquipmentTemplate) results.push(`{{V|${gameVersion.substr(1)} | if (!returnEquipmentTemplate) results.push(`{{Disam}}{{V|${gameVersion.substr(1)}}}\n`, `'''${searchTerm}''' may refer to:`); | ||
pushResults({arr: game.items.equipment.filter(x => search(x)), header: '===Equipment===', iconType: 'ItemIcon'}); | pushResults({arr: game.items.equipment.filter(x => search(x)), header: '===Equipment===', iconType: 'ItemIcon'}); | ||
pushResults({arr: game.items.filter(x => x.validSlots === undefined && !(x instanceof OpenableItem) && !(x instanceof BoneItem) && !(x instanceof FoodItem) && search(x)), header: '===Items===', iconType: 'ItemIcon'}); | pushResults({arr: game.items.filter(x => x.validSlots === undefined && !(x instanceof OpenableItem) && !(x instanceof BoneItem) && !(x instanceof FoodItem) && search(x)), header: '===Items===', iconType: 'ItemIcon'}); |