4,581
edits
m (Remove double spacing when there's no expansion icon) |
m (Add Slayer Categories; Melvor items will now use {{Melvor}} as the expansion icon) |
||
Line 16: | Line 16: | ||
const search = (item) => !item.isModded && item.name.toLowerCase().includes(searchTerm.toLowerCase()); | const search = (item) => !item.isModded && item.name.toLowerCase().includes(searchTerm.toLowerCase()); | ||
const wikiIcon = (item, icon, extras) => { | const wikiIcon = (item, icon, extras) => { | ||
if (!returnEquipmentTemplate) | if (!returnEquipmentTemplate) { | ||
let expIcon = `${item.namespace.includes('TotH') ? ' {{TotH}}' : item.namespace.includes('AoD') ? ' {{AoD}}' : item.namespace.includes('ItA') ? ' {{ItA}}' : ' {{Melvor}}'}`; | |||
let iconTemplate = icon === 'Slayer' ? ` [[Slayer#${item.name}|${item.name} Slayer Tier]]` : ` {{${icon}|${item.name}${extras}}}`; | |||
return `*${expIcon}${iconTemplate}`; | |||
} | |||
return `|${item.name}`; | return `|${item.name}`; | ||
} | } | ||
Line 50: | Line 53: | ||
pushResults(game.thieving.actions.filter(x => search(x)), '\n== Others ==', 'Icon', '|type=thieving'); | pushResults(game.thieving.actions.filter(x => search(x)), '\n== Others ==', 'Icon', '|type=thieving'); | ||
pushResults(game.combatEffects.allObjects.filter(x => search(x)), '\n== Others ==', 'EffectIcon'); | pushResults(game.combatEffects.allObjects.filter(x => search(x)), '\n== Others ==', 'EffectIcon'); | ||
pushResults(game.combat.slayerTask.categories.allObjects.filter(x => search(x)), '\n== Others ==', 'Slayer'); | |||
if (cloudManager.hasAoDEntitlementAndIsEnabled) | if (cloudManager.hasAoDEntitlementAndIsEnabled) | ||
pushResults(game.cartography.worldMaps.getObjectByID('melvorAoD:Melvor').pointsOfInterest.filter(x => search(x)), '\n== Others ==', 'POIIcon'); | pushResults(game.cartography.worldMaps.getObjectByID('melvorAoD:Melvor').pointsOfInterest.filter(x => search(x)), '\n== Others ==', 'POIIcon'); |