Anonymous

Template:Disambiguation/doc: Difference between revisions

From Melvor Idle
m
Swapped version and disam templates in script
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)}}}{{Disam}}\n`, `'''${searchTerm}''' may refer to:`);
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'});