Module:Inventory slot/Aliases: Difference between revisions
→Test: Adding animated potions |
→Revert: Previous edit *is working* but would break hundreds of potion inventory icons for a few days until .GIFs are uploaded |
||
| Line 659: | Line 659: | ||
else | else | ||
-- we always have normal | -- we always have normal | ||
aliases[name] = { name = name | aliases[name] = { name = name, text = string.format( '%s (%s)', effect.effect, durations[1] ) } | ||
-- ensure we have extended | -- ensure we have extended | ||
if durations[2] then | if durations[2] then | ||
aliases[name .. ' Extended'] = { name = name | aliases[name .. ' Extended'] = { name = name, text = string.format( '%s (%s)', effect.effect, durations[2] ) } | ||
-- 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 = name | aliases[name .. ' Enhanced'] = { name = name, text = string.format( '%s %s (%s)', effect.effect, effect.enhanced, durations[3] ) } | ||
end | end | ||
end | end | ||
| Line 673: | Line 673: | ||
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 = name | aliases[name] = { name = name, text = effect.effect} | ||
aliases[name .. ' Enhanced'] = { name = name | aliases[name .. ' Enhanced'] = { name = name, text = effect.effect .. ' ' .. effect.enhanced } | ||
end | end | ||