Module:InventorySlot/Aliases: Difference between revisions

m
idk how that works man, just don't use Turtle Helmet
m (Removing that .gif)
m (idk how that works man, just don't use Turtle Helmet)
Tag: Manual revert
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
local aliases = {
local aliases = {
-- Display names --
     ['Broken Elytra'] = { title = '&eElytra', name = 'Broken Elytra' },
     ['Broken Elytra'] = { title = '&eElytra', name = 'Broken Elytra' },
['Clay (block)'] = { title = 'Clay', name = 'Clay (block)' },  
['Clay (block)'] = { title = 'Clay', name = 'Clay (block)' },  
['Clay (ball)'] = { title = 'Clay', name = 'Clay (ball)' }
['Clay (ball)'] = { title = 'Clay', name = 'Clay (ball)' },
['Iron Block'] = { title = 'Block of Iron', name = 'Block of Iron' },
['Gold Block'] = { title = 'Block of Gold', name = 'Block of Gold' },
['Diamond Block'] = { title = 'Block of Diamond', name = 'Block of Diamond' },
['Button'] = { title = 'Button', name = 'Stone Button'},
['Wooden Button'] = { title = 'Button', name = 'Oak Button'},
['Arrow Loaded Crossbow'] = { title = 'Crossbow', name = 'Arrow Loaded Crossbow' },
['Damaged Arrow Loaded Crossbow'] = { title = 'Crossbow', name = 'Damaged Arrow Loaded Crossbow' },
['Firework Loaded Crossbow'] = { title = 'Crossbow', name = 'Firework Loaded Crossbow' },
['Damaged Firework Loaded Crossbow'] = { title = 'Crossbow', name = 'Damaged Firework Loaded Crossbow' },
['Illager Banner'] = { title = '&6&oIllager Banner', name = 'Illager Banner', text =
'&7Cyan Lozenge/&7Light Gray Base/&7Gray Pale/&7Light Gray Bordure/&7Black Fess/&7Light Gray Per Fess'},
['Jigsaw Block'] = { title = '&dJigsaw Block', name = 'Jigsaw Block' },
['Half Filled Bundle'] = { title = 'Bundle', name = 'Half Filled Bundle' },
['Filled Bundle'] = { title = 'Bundle', name = 'Filled Bundle' },
 
-- Weapons --
['Trident'] = { name = 'Trident', text = '/&7 When in main hand:/ &21.1 Attack Speed/ &29 Attack Damage'},
 
-- Wood --
['Mangrove Sapling'] = {name = 'Mangrove Propagule'},
['Bamboo Boat'] = {name ='Bamboo Raft'},
['Bamboo Boat with Chest'] = {name = 'Bamboo Raft with Chest'}
}
}


-- Tooltip colors --
-- Tooltip colors --
Line 13: Line 35:
'Dragon\'s Breath',
'Dragon\'s Breath',
'Elytra',
'Elytra',
'Enchanted Book',
'Head',
'Head',
'Heart of the Sea',
'Heart of the Sea',
Line 23: Line 46:
for _, name in ipairs( yellowTooltips ) do
for _, name in ipairs( yellowTooltips ) do
aliases[name] = { title = '&e', name = name }
aliases[name] = { title = '&e', name = name }
end
local enchantedIconYellowTooltips = {
"Bottle o' Enchanting",
'Enchanted Book',
'Nether Star'
}
for _, name in ipairs( enchantedIconYellowTooltips ) do
aliases[name] = { title = '&e', name = name, enchanted = "true" }
end
end


Line 32: Line 65:
for _, name in ipairs( aquaTooltips ) do
for _, name in ipairs( aquaTooltips ) do
aliases[name] = { title = '&b', name = name }
aliases[name] = { title = '&b', name = name }
end
local enchantedIconAquaTooltips = {
'End Crystal'
}
for _, name in ipairs( enchantedIconAquaTooltips ) do
aliases[name] = { title = '&b', name = name, enchanted = "true" }
end
end


Line 38: Line 79:
'Structure Block',
'Structure Block',
}
}
for _, name in ipairs( lightPurpleTooltips ) do
for _, name in ipairs( lightPurpleTooltips ) do
aliases[name] = { title = '&d', name = name }
aliases[name] = { title = '&d', name = name }
end
end


local enchantedIconPurpleTooltips = {
'Enchanted Golden Apple'
}
for _, name in ipairs( enchantedIconPurpleTooltips ) do
aliases[name] = { title = '&d', name = name, enchanted = "true" }
end


-- Discs --
-- Discs --
local discs = {  
local discs = {  
{ '13',     'C418',                 },
{ '13', 'C418', },
{ 'Cat',     'C418',       'cat'     },
{ 'Cat', 'C418', 'cat' },
{ 'Blocks', 'C418',       'blocks' },
{ 'Blocks', 'C418', 'blocks' },
{ 'Chirp',   'C418',       'chirp'   },
{ 'Chirp', 'C418', 'chirp' },
{ 'Far',     'C418',       'far'     },
{ 'Far', 'C418', 'far' },
{ 'Mall',   'C418',       'mall'   },
{ 'Mall', 'C418', 'mall' },
{ 'Mellohi', 'C418',       'mellohi' },
{ 'Mellohi', 'C418', 'mellohi' },
{ 'Stal',   'C418',       'stal'   },
{ 'Stal', 'C418', 'stal' },
{ 'Strad',   'C418',       'strad'   },
{ 'Strad', 'C418', 'strad' },
{ 'Ward',   'C418',       'ward'   },
{ 'Ward', 'C418', 'ward' },
{ '11',     'C418',                 },
{ '11', 'C418', },
{ 'Wait',   'C418',       'wait'   },
{ 'Wait', 'C418', 'wait' },
{ 'Pigstep', 'Lena Raine',           },
{ 'Otherside', 'Lena Raine', 'otherside' },
{ 'Pigstep', 'Lena Raine', },
{ '5', 'Samuel Åberg', },
 
}
}
for _, disc in ipairs( discs ) do
for _, disc in ipairs( discs ) do
Line 68: Line 120:
aliases[name] = { title = '&bMusic Disc', name = name, text = '&7' .. artist .. ' - ' .. trackname }
aliases[name] = { title = '&bMusic Disc', name = name, text = '&7' .. artist .. ' - ' .. trackname }
end
end
-- Armour
local armour = {
{'Turtle', 'Shell', 2, 0 },
{'Leather', 'Cap', 1, 0 },
{'Golden', 'Helmet', 2, 0 },
{'Chainmail', 'Helmet', 2, 0 },
{'Iron', 'Helmet', 2, 0 },
{'Diamond', 'Helmet', 3, 2 },
{'Netherite', 'Helmet', 3, 3 },
{'Leather', 'Tunic', 3, 0 },
{'Golden', 'Chestplate', 5, 0 },
{'Chainmail', 'Chestplate', 5, 0 },
{'Iron', 'Chestplate', 6, 0 },
{'Diamond', 'Chestplate', 8, 2 },
{'Netherite', 'Chestplate', 8, 3 },
{'Leather', 'Pants', 2, 0 },
{'Golden', 'Leggings', 3, 0 },
{'Chainmail', 'Leggings', 4, 0 },
{'Iron', 'Leggings', 5, 0 },
{'Diamond', 'Leggings', 6, 2 },
{'Netherite', 'Leggings', 6, 3 },
{'Leather', 'Boots', 1, 0 },
{'Golden', 'Boots', 1, 0 },
{'Chainmail', 'Boots', 1, 0 },
{'Iron', 'Boots', 2, 0 },
{'Diamond', 'Boots', 3, 2 },
{'Netherite', 'Boots', 3, 3 }
}
for _, armourProps in ipairs( armour ) do
local aliasName = armourProps[1] .. ' ' .. armourProps[2]
local armourSlotText = '/&7When on '
if armourProps[2] == 'Shell' or armourProps[2] == 'Cap' or armourProps[2] == 'Helmet' then
armourSlotText = armourSlotText .. 'head'
elseif armourProps[2] == 'Tunic' or armourProps[2] == 'Chestplate' then
armourSlotText = armourSlotText .. 'body'
elseif armourProps[2] == 'Pants' or armourProps[2] == 'Leggings' then
armourSlotText = armourSlotText .. 'legs'
else
armourSlotText = armourSlotText .. 'feet'
end
armourSlotText = armourSlotText .. ':/&9+'
-- If Armour Toughness (diamond or netherite armour)
if armourProps[4] ~= 0 then
aliases[aliasName] = { title = aliasName, name = aliasName, text = armourSlotText .. armourProps[4] .. ' Armour Toughness/+' .. armourProps[3] .. ' Armour' }
-- No Armour Toughness (all other armour)
else
aliases[aliasName] = { title = aliasName, name = aliasName, text = armourSlotText .. armourProps[3] .. ' Armour' }
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 }
}
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' }
end




Line 176: Line 336:
-- turtle master is weird, so just do a fancy string replacement
-- turtle master is weird, so just do a fancy string replacement
if effect.text then
if effect.text then
aliases[name] = { name = potionName, text = effect.text:gsub( '%$1', durations[1] ) }
aliases[name] = { name = potionName, text = effect.text:gsub( '%$1', durations[1] ), enchanted = "true" }
aliases[name .. ' Extended'] = { name = potionName, text = effect.text:gsub( '%$1', durations[2] ) }
aliases[name .. ' Extended'] = { name = potionName, text = effect.text:gsub( '%$1', durations[2] ), enchanted = "true" }
aliases[name .. ' Enhanced'] = { name = potionName, text = effect.enhanced:gsub( '%$1', durations[3] ) }
aliases[name .. ' Enhanced'] = { name = potionName, text = effect.enhanced:gsub( '%$1', durations[3] ), enchanted = "true" }
else
else
-- we always have normal
-- we always have normal
aliases[name] = { name = potionName, text = string.format( '%s (%s)', effect.effect, durations[1] ) }
aliases[name] = { name = potionName, text = string.format( '%s (%s)', effect.effect, durations[1] ), enchanted = "true" }
-- ensure we have extended
-- ensure we have extended
if durations[2] then
if durations[2] then
aliases[name .. ' Extended'] = { name = potionName, text = string.format( '%s (%s)', effect.effect, durations[2] ) }
aliases[name .. ' Extended'] = { name = potionName, text = string.format( '%s (%s)', effect.effect, durations[2] ), enchanted = "true" }
-- and enhanced, currently there is nothing with a duration that can be extended but not enhanced
-- and enhanced, currently there is nothing with a duration that can be extended but not enhanced
if effect.enhanced then
if effect.enhanced then
aliases[name .. ' Enhanced'] = { name = potionName, text = string.format( '%s %s (%s)', effect.effect, effect.enhanced, durations[3] ) }
aliases[name .. ' Enhanced'] = { name = potionName, text = string.format( '%s %s (%s)', effect.effect, effect.enhanced, durations[3] ), enchanted = "true" }
end
end
end
end
Line 195: Line 355:
else
else
-- otherwise its just effect, currently every potion with no duration can be enhanced
-- otherwise its just effect, currently every potion with no duration can be enhanced
aliases[name] = { name = potionName, text = effect.effect}
aliases[name] = { name = potionName, text = effect.effect, enchanted = "true" }
aliases[name .. ' Enhanced'] = { name = potionName, text = effect.effect .. ' ' .. effect.enhanced }
aliases[name .. ' Enhanced'] = { name = potionName, text = effect.effect .. ' ' .. effect.enhanced, enchanted = "true" }
end
end
Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,637

edits