Module:InventorySlot/Aliases: Difference between revisions

m
true -> "true"
m (ipair is plural)
m (true -> "true")
Line 36: Line 36:


for _, name in ipairs( enchantedIconYellowTooltips ) do
for _, name in ipairs( enchantedIconYellowTooltips ) do
aliases[name] = { title = '&e', name = name, enchanted = true }
aliases[name] = { title = '&e', name = name, enchanted = "true" }
end
end


Line 53: Line 53:


for _, name in ipairs( enchantedIconAquaTooltips ) do
for _, name in ipairs( enchantedIconAquaTooltips ) do
aliases[name] = { title = '&b', name = name, enchanted = true }
aliases[name] = { title = '&b', name = name, enchanted = "true" }
end
end


Line 70: Line 70:


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


Line 314: Line 314:
-- 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] ), enchanted = true }
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] ), enchanted = true }
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] ), enchanted = true }
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] ), enchanted = true }
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] ), enchanted = true }
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] ), enchanted = true }
aliases[name .. ' Enhanced'] = { name = potionName, text = string.format( '%s %s (%s)', effect.effect, effect.enhanced, durations[3] ), enchanted = "true" }
end
end
end
end
Line 334: Line 334:
-- 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, enchanted = yes }
aliases[name] = { name = potionName, text = effect.effect, enchanted = yes }
aliases[name .. ' Enhanced'] = { name = potionName, text = effect.effect .. ' ' .. effect.enhanced, enchanted = true }
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