Module:InventorySlot/Aliases: Difference between revisions

m
Tool tips (ha, get it?)
m (Removing that .gif)
m (Tool tips (ha, get it?))
Line 68: Line 68:
aliases[name] = { title = '&bMusic Disc', name = name, text = '&7' .. artist .. ' - ' .. trackname }
aliases[name] = { title = '&bMusic Disc', name = name, text = '&7' .. artist .. ' - ' .. trackname }
end
end
-- Tools and weapons --
local tools = {
{'Wooden', 'Sword', 1.6, 4 },
{'Stone', 'Sword', 1.6, 5 },
{'Iron', 'Sword', 1.6, 6 },
{'Golden', 'Sword', 1.6, 4 },
{'Diamond', 'Sword', 1.6, 7 },
{'Netherite', 'Sword', 1.6, 8 },
{'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 },
{'Netherite', 'Pickaxe', 1.2, 6 },
{'Wooden', 'Axe', 0.8, 7 },
{'Stone', 'Axe', 0.8, 9 },
{'Iron', 'Axe', 0.9, 9 },
{'Golden', 'Axe', 1, 7 },
{'Diamond', 'Axe', 1, 9 },
{'Netherite', '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 },
{'Netherite', 'Shovel', 1.6, 6.5 },
{'Wooden', 'Hoe', 1, 1 },
{'Stone', 'Hoe', 2, 1 },
{'Iron', 'Hoe', 3, 1 },
{'Golden', 'Hoe', 1, 1 },
{'Diamond', 'Hoe', 4, 1 },
{'Netherite', '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:/ &2' .. toolProps[3] .. ' Attack Speed/ &2' .. 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




Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,659

edits