Module:Inventory slot/Aliases: Difference between revisions

Remove old stained clay alias, update banner aliases
Automatized tools and swords
Line 5: Line 5:
}
}
local aliases = {
local aliases = {
    -- All Tools (WIP) (Credits: User: TheWoodenWizard) --
['Wooden Sword'] = { title = 'Wooden Sword', name = 'Wooden Sword', text = '/&7When in main hand:/ &71.6 Attack Speed/ &74 Attack Damage' },
['Stone Sword'] = { title = 'Stone Sword', name = 'Stone Sword', text = '/&7When in main hand:/ &71.6 Attack Speed/ &75 Attack Damage' },
['Iron Sword'] = { title = 'Iron Sword', name = 'Iron Sword', text = '/&7When in main hand:/ &71.6 Attack Speed/ &76 Attack Damage' },
['Golden Sword'] = { title = 'Golden Sword', name = 'Golden Sword', text = '/&7When in main hand:/ &71.6 Attack Speed/ &74 Attack Damage' },
['Diamond Sword'] = { title = 'Diamond Sword', name = 'Diamond Sword', text = '/&7When in main hand:/ &71.6 Attack Speed/ &77 Attack Damage' },
['Wooden Pickaxe'] = { title = 'Wooden Pickaxe', name = 'Wooden Pickaxe', text = '/&7When in main hand:/ &71.2 Attack Speed/ &72 Attack Damage' },
['Stone Pickaxe'] = { title = 'Stone Pickaxe', name = 'Stone Pickaxe', text = '/&7When in main hand:/ &71.2 Attack Speed/ &73 Attack Damage' },
['Iron Pickaxe'] = { title = 'Iron Pickaxe', name = 'Iron Pickaxe', text = '/&7When in main hand:/ &71.2 Attack Speed/ &74 Attack Damage' },
['Golden Pickaxe'] = { title = 'Golden Pickaxe', name = 'Golden Pickaxe', text = '/&7When in main hand:/ &71.2 Attack Speed/ &72 Attack Damage' },
['Diamond Pickaxe'] = { title = 'Diamond Pickaxe', name = 'Diamond Pickaxe', text = '/&7When in main hand:/ &71.2 Attack Speed/ &75 Attack Damage' },
['Wooden Axe'] = { title = 'Wooden Axe', name = 'Wooden Axe', text = '/&7When in main hand:/ &70.8 Attack Speed/ &77 Attack Damage' },
['Stone Axe'] = { title = 'Stone Axe', name = 'Stone Axe', text = '/&7When in main hand:/ &70.8 Attack Speed/ &79 Attack Damage' },
['Iron Axe'] = { title = 'Iron Axe', name = 'Iron Axe', text = '/&7When in main hand:/ &70.9 Attack Speed/ &79 Attack Damage' },
['Golden Axe'] = { title = 'Golden Axe', name = 'Golden Axe', text = '/&7When in main hand:/ &71.0 Attack Speed/ &77 Attack Damage' },
['Diamond Axe'] = { title = 'Diamond Axe', name = 'Diamond Axe', text = '/&7When in main hand:/ &71.0 Attack Speed/ &79 Attack Damage' },
-- Common fuel types for furnace --
-- Common fuel types for furnace --
['Any fuel'] = { 'Coal', 'Charcoal', { title = 'Wood', name = 'Oak Wood' }, { title = 'Wood Planks', name = 'Oak Wood Planks' }, 'Block of Coal' },
['Any fuel'] = { 'Coal', 'Charcoal', { title = 'Wood', name = 'Oak Wood' }, { title = 'Wood Planks', name = 'Oak Wood Planks' }, 'Block of Coal' },
['Any golden tools'] = { 'Golden Pickaxe', 'Golden Axe', 'Golden Shovel', 'Golden Hoe' },
['Any wooden tools'] = { 'Wooden Pickaxe', 'Wooden Axe', 'Wooden Shovel', 'Wooden Hoe' },
['Any stone tools'] = { 'Stone Pickaxe', 'Stone Axe', 'Stone Shovel', 'Stone Hoe' },
['Any iron tools'] = { 'Iron Pickaxe', 'Iron Axe', 'Iron Shovel', 'Iron Hoe' },
['Any diamond tools'] = { 'Diamond Pickaxe', 'Diamond Axe', 'Diamond Shovel', 'Diamond Hoe' },
['Any leather armor'] = { 'Leather Cap', 'Leather Tunic', 'Leather Pants', 'Leather Boots' },
['Any leather armor'] = { 'Leather Cap', 'Leather Tunic', 'Leather Pants', 'Leather Boots' },
['Any golden armor'] = { 'Golden Helmet', 'Golden Chestplate', 'Golden Leggings', 'Golden Boots' },
['Any golden armor'] = { 'Golden Helmet', 'Golden Chestplate', 'Golden Leggings', 'Golden Boots' },
Line 89: Line 68:
['Arrow of Decay'] = { name = 'Arrow of Decay', text = '&cWither II (0:05)' },
['Arrow of Decay'] = { name = 'Arrow of Decay', text = '&cWither II (0:05)' },
}
}
-- Tools and weapons --
local tools = {
{'Wooden', 'Sword', 1.6, 4 },
{'Stone', 'Sword', 1.6, 5 },
{'Iron', 'Sword', 1.6, 4 },
{'Golden', 'Sword', 1.6, 7 },
{'Diamond', 'Sword', 1.6, 6 },
{'Wooden', 'Pickaxe', 1.2, 2 },
{'Stone', 'Pickaxe', 1.2, 3 },
{'Iron', 'Pickaxe', 1.2, 4 },
{'Golden', 'Pickaxe', 1.2, 2 },
{'Diamond', 'Pickaxe', 1.2, 5 },
{'Wooden', 'Axe', 0.8, 7 },
{'Stone', 'Axe', 0.8, 9 },
{'Iron', 'Axe', 0.9, 9 },
{'Golden', 'Axe', 1, 7 },
{'Diamond', 'Axe', 1, 9 },
{'Wooden', 'Shovel', 1, 2.5 },
{'Stone', 'Shovel', 1, 3.5 },
{'Iron', 'Shovel', 1, 4.5 },
{'Golden', 'Shovel', 1, 2.5 },
{'Diamond', 'Shovel', 1, 5.5 },
{'Wooden', 'Hoe', 1, 1 },
{'Stone', 'Hoe', 2, 1 },
{'Iron', 'Hoe', 3, 1 },
{'Golden', 'Hoe', 1, 1 },
{'Diamond', 'Hoe', 4, 1 }
}
local materialGroups = {}
local toolGroups = {}
for _, toolProps in ipairs( tools ) do
local aliasName = toolProps[1] .. ' ' .. toolProps[2]
aliases[aliasName] = { title = aliasName, name = aliasName, text = '/&7When in main hand:/ &7' .. toolProps[3] .. ' Attack Speed/ &7' .. toolProps[4] .. ' Attack Damage' }
local materialGroup = toolProps[1]:lower();
local toolGroup = toolProps[2]:lower();
if toolProps[2] ~= 'Sword' then
if materialGroups[materialGroup] == nil then materialGroups[materialGroup] = {} end
table.insert( materialGroups[materialGroup], aliases[aliasName] )
end
if toolGroups[toolGroup] == nil then toolGroups[toolGroup] = {} end
table.insert( toolGroups[toolGroup], aliases[aliasName] )
end
for materialGroup, items in pairs( materialGroups ) do
aliases['Any ' .. materialGroup .. ' tools'] = items
end
for toolGroup, items in pairs( toolGroups ) do
aliases['Any ' .. toolGroup] = items
end


-- Lists of item variants --
-- Lists of item variants --