Template:Disambiguation/doc: Difference between revisions

Added Menu to the bottom of the template. Excluded modded items
(Improved EquipmentTableFromList output in script)
(Added Menu to the bottom of the template. Excluded modded items)
Line 12: Line 12:
// End of Settings //
// End of Settings //
let lcSearchTerm = searchTerm.toLowerCase();
let lcSearchTerm = searchTerm.toLowerCase();
const search = (obj) => obj.name?.toLowerCase().includes(lcSearchTerm);
const search = (obj) => !obj.isModded && obj.name?.toLowerCase().includes(lcSearchTerm);
const wikiIcon = (obj, icon, extras) => {
const wikiIcon = (obj, icon, extras) => {
if (!returnEquipmentTemplate)
if (!returnEquipmentTemplate)
Line 52: Line 52:
let outputString = ``;
let outputString = ``;
results.forEach((str, i) => { outputString += (returnEquipmentTemplate ? i > 0 ? `\n|${str}` : `${str}` : `${str}\n`) });
results.forEach((str, i) => { outputString += (returnEquipmentTemplate ? i > 0 ? `\n|${str}` : `${str}` : `${str}\n`) });
if (returnEquipmentTemplate) outputString += '\n}}';
if (returnEquipmentTemplate) outputString += '\n}}\n';
outputString += `\n{{Menu}}`;
copy(outputString);console.log(outputString);
copy(outputString);console.log(outputString);
notifyPlayer(game.attack, `Copied results for ${searchTerm} to clipboard`, 'success', 0);
notifyPlayer(game.attack, `Copied results for ${searchTerm} to clipboard`, 'success', 0);
</syntaxhighlight>
</syntaxhighlight>