Module:Inventory slot/Aliases: Difference between revisions

Removed dye repetition
adding colored firework star aliases. I am using the same color loop as the banners for simplicity
Line 8: Line 8:
['Any Colored Dye'] = coloredDyes,
['Any Colored Dye'] = coloredDyes,
['Any Fence Gate'] = 'Oak Fence Gate; Spruce Fence Gate; Birch Fence Gate; Jungle Fence Gate; Acacia Fence Gate; Dark Oak Fence Gate',
['Any Fence Gate'] = 'Oak Fence Gate; Spruce Fence Gate; Birch Fence Gate; Jungle Fence Gate; Acacia Fence Gate; Dark Oak Fence Gate',
['Any Firework Star'] = 'White Firework Star; Orange Firework Star; Magenta Firework Star; Light Blue Firework Star; Yellow Firework Star; Lime Firework Star; Pink Firework Star; Gray Firework Star; Light Gray Firework Star; Cyan Firework Star; Purple Firework Star; Blue Firework Star; Brown Firework Star; Green Firework Star; Red Firework Star; Black Firework Star',
['Any fuel'] = 'Coal; Charcoal; Oak Wood; Oak Wood Planks',
['Any fuel'] = 'Coal; Charcoal; Oak Wood; Oak Wood Planks',
['Any Mushroom'] = '[Mushroom]Red Mushroom; [Mushroom]Brown Mushroom',
['Any Mushroom'] = '[Mushroom]Red Mushroom; [Mushroom]Brown Mushroom',
Line 169: Line 168:
}
}


aliases['Any Firework Star'] = {}
for _, color in ipairs( colors ) do
for _, color in ipairs( colors ) do
local name = color .. ' Firework Star'
aliases[name] = '[Firework Star]' .. name .. '[&7' .. color .. ']'
table.insert( aliases['Any Firework Star'], aliases[name] )
for _, pattern in ipairs( patterns ) do
for _, pattern in ipairs( patterns ) do
local name = color .. ' ' .. pattern .. ' Banner'
name = color .. ' ' .. pattern .. ' Banner'
aliases[name] = '[Banner]' .. name .. '[&7' .. color .. ' ' .. pattern .. ']'
aliases[name] = '[Banner]' .. name .. '[&7' .. color .. ' ' .. pattern .. ']'
end
end
end
end
aliases['Any Firework Star'] = table.concat( aliases['Any Firework Star'], ';' )


return aliases
return aliases