Module:Abilities/card: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Added prefix support for altbox |
Removed exclude plus logic as it should no longer be needed in format_value_with_prepost function |
||
| Line 29: | Line 29: | ||
combat_barrier = {img='Barrier.png', link='Barrier', color = 'Green'}, | combat_barrier = {img='Barrier.png', link='Barrier', color = 'Green'}, | ||
time = {img='AttributeIconTechDuration.png', link='Ability Duration', color = 'Purple'}, | time = {img='AttributeIconTechDuration.png', link='Ability Duration', color = 'Purple'}, | ||
} | } | ||
| Line 315: | Line 297: | ||
-- Exclude 0 values | -- Exclude 0 values | ||
if value and value ~= 0 then | if value and value ~= 0 then | ||
local icon = get_icon(prop.Type) | local icon = get_icon(prop.Type) | ||
local main_box = frame:expandTemplate{ | local main_box = frame:expandTemplate{ | ||
| Line 324: | Line 303: | ||
title = prop.Title, | title = prop.Title, | ||
key = prop.Key, | key = prop.Key, | ||
value = utils.format_value_with_prepost(prop.Key, value, frame | value = utils.format_value_with_prepost(prop.Key, value, frame), | ||
icon = icon.img, | icon = icon.img, | ||
icon_link = icon.link, | icon_link = icon.link, | ||
| Line 366: | Line 345: | ||
for k, prop in pairs(props) do | for k, prop in pairs(props) do | ||
-- Some props don't have values, as those come from upgrades | -- Some props don't have values, as those come from upgrades | ||
-- For now, we will ignore these and only show data for the base ability | -- For now, we will ignore these and only show data for the base ability | ||
| Line 375: | Line 353: | ||
args = { | args = { | ||
key = prop.Key, | key = prop.Key, | ||
value = utils.format_value_with_prepost(prop.Key, prop.Value, frame | value = utils.format_value_with_prepost(prop.Key, prop.Value, frame), | ||
icon = icon.img, | icon = icon.img, | ||
icon_link = icon.link, | icon_link = icon.link, | ||