Module:Inventory slot/Aliases: Difference between revisions

m added buttons
adding every single patterned banner to the alias list by slightly changing the logic. It will take a little longer to process, but that is only a fraction of a second per page, rather than per call of grid
Line 1: Line 1:
return {
local aliases = {
-- Lists --
-- Lists --
['Any Banner'] = 'White Banner; Orange Banner; Magenta Banner; Light Blue Banner; Yellow Banner; Lime Banner; Pink Banner; Gray Banner; Light Gray Banner; Cyan Banner; Purple Banner; Blue Banner; Brown Banner; Green Banner; Red Banner; Black Banner',
['Any Banner'] = 'White Banner; Orange Banner; Magenta Banner; Light Blue Banner; Yellow Banner; Lime Banner; Pink Banner; Gray Banner; Light Gray Banner; Cyan Banner; Purple Banner; Blue Banner; Brown Banner; Green Banner; Red Banner; Black Banner',
Line 27: Line 27:


-- Display names --
-- Display names --
['13 Disc'] = '[&bMusic Disc]13 Disc[&7C418 - 13]',
['cat Disc'] = '[&bMusic Disc]cat Disc[&7C418 - cat]',
['blocks Disc'] = '[&bMusic Disc]blocks Disc[&7C418 - blocks]',
['chirp Disc'] = '[&bMusic Disc]chirp Disc[&7C418 - chirp]',
['far Disc'] = '[&bMusic Disc]far Disc[&7C418 - far]',
['mall Disc'] = '[&bMusic Disc]mall Disc[&7C418 - mall]',
['mellohi Disc'] = '[&bMusic Disc]mellohi Disc[&7C418 - mellohi]',
['stal Disc'] = '[&bMusic Disc]stal Disc[&7C418 - stal]',
['strad Disc'] = '[&bMusic Disc]strad Disc[&7C418 - strad]',
['ward Disc'] = '[&bMusic Disc]ward Disc[&7C418 - ward]',
['11 Disc'] = '[&bMusic Disc]11 Disc[&7C418 - 11]',
['wait Disc'] = '[&bMusic Disc]wait Disc[&7C418 - wait]',
['Brown Mushroom'] = '[Mushroom]Brown Mushroom',
['Brown Mushroom'] = '[Mushroom]Brown Mushroom',
['Brown Mushroom (block)'] = '[Mushroom]Brown Mushroom (block)',
['Brown Mushroom (block)'] = '[Mushroom]Brown Mushroom (block)',
Line 52: Line 40:
['Stone Button'] = '[Button]Stone Button',
['Stone Button'] = '[Button]Stone Button',
['Wooden Button'] = '[Button]Wooden Button',
['Wooden Button'] = '[Button]Wooden Button',
--- Discs ---
['13 Disc'] = '[&bMusic Disc]13 Disc[&7C418 - 13]',
['cat Disc'] = '[&bMusic Disc]cat Disc[&7C418 - cat]',
['blocks Disc'] = '[&bMusic Disc]blocks Disc[&7C418 - blocks]',
['chirp Disc'] = '[&bMusic Disc]chirp Disc[&7C418 - chirp]',
['far Disc'] = '[&bMusic Disc]far Disc[&7C418 - far]',
['mall Disc'] = '[&bMusic Disc]mall Disc[&7C418 - mall]',
['mellohi Disc'] = '[&bMusic Disc]mellohi Disc[&7C418 - mellohi]',
['stal Disc'] = '[&bMusic Disc]stal Disc[&7C418 - stal]',
['strad Disc'] = '[&bMusic Disc]strad Disc[&7C418 - strad]',
['ward Disc'] = '[&bMusic Disc]ward Disc[&7C418 - ward]',
['11 Disc'] = '[&bMusic Disc]11 Disc[&7C418 - 11]',
['wait Disc'] = '[&bMusic Disc]wait Disc[&7C418 - wait]',


-- Damaged armor, tools and weapons --
-- Damaged armor, tools and weapons --
Line 105: Line 106:
['Damaged Wooden Sword'] = '[Wooden Sword]Damaged Wooden Sword',
['Damaged Wooden Sword'] = '[Wooden Sword]Damaged Wooden Sword',
}
}
-- Since there are currently 608 banners, batch process them --
local patterns = {
'Base Dexter Canton',
'Base Fess',
'Base Gradient',
'Base Indented',
'Base Sinister Canton',
'Bend',
'Bend Sinister',
'Bordure',
'Bordure Indented',
'Chevron',
'Chief Dexter Canton',
'Chief Fess',
'Chief Indented',
'Chief Sinister Canton',
'Creeper Charge',
'Cross',
'Fess',
'Field Masoned',
'Flower Charge',
'Gradient',
'Inverted Chevron',
'Lozenge',
'Mojang Charge',
'Pale',
'Pale Dexter',
'Pale Sinister',
'Paly',
'Per Bend',
'Per Bend Inverted',
'Per Bend Sinister',
'Per Bend Sinister Inverted',
'Per Fess',
'Per Fess Inverted',
'Per Pale',
'Per Pale Inverted',
'Roundel',
'Saltire',
'Skull Charge'
}
local colors = {
'Black',
'Blue',
'Brown',
'Cyan',
'Gray',
'Green',
'Light Blue',
'Light Gray',
'Lime',
'Magenta',
'Orange',
'Pink',
'Purple',
'Red',
'White',
'Yellow'
}
for _, color in ipairs( colors ) do
for _, pattern in ipairs( patterns ) do
local name = color .. ' ' .. pattern .. ' Banner'
aliases[name] = '[Banner]' .. name .. '[&7' .. color .. ' ' .. pattern .. ']'
end
end
return aliases