Module:Abilities-test/card: Difference between revisionsGive feedback
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 162: | Line 162: | ||
-- Info section #1 defined in "Info1" attribute | -- Info section #1 defined in "Info1" attribute | ||
hide_info1 = infobox_is_hidden(ability.Info1) and "true" or "false", | |||
info1_desc = info1_desc, | info1_desc = info1_desc, | ||
info1_mainbox1 = info1_main_boxes[1], | info1_mainbox1 = info1_main_boxes[1], | ||
| Line 176: | Line 177: | ||
-- Info section #2 defined in "Info2" attribute | -- Info section #2 defined in "Info2" attribute | ||
hide_info2 = infobox_is_hidden(ability.Info2) and "true" or "false", | |||
info2_desc = info2_desc, | info2_desc = info2_desc, | ||
info2_mainbox1 = info2_main_boxes[1], | info2_mainbox1 = info2_main_boxes[1], | ||
| Line 190: | Line 192: | ||
-- Info section #3 defined in "Info3" attribute | -- Info section #3 defined in "Info3" attribute | ||
hide_info3 = infobox_is_hidden(ability.Info3) and "true" or "false", | |||
info3_desc = info3_desc, | info3_desc = info3_desc, | ||
info3_mainbox1 = info3_main_boxes[1], | info3_mainbox1 = info3_main_boxes[1], | ||
| Line 213: | Line 216: | ||
} | } | ||
} | } | ||
end | |||
function infobox_is_hidden(infobox) | |||
if infobox == nil then | |||
return false | |||
end | |||
return infobox.RequiresUpgradeIndex ~= nil | |||
end | end | ||
| Line 548: | Line 559: | ||
return mw.getCurrentFrame():expandTemplate{ | return mw.getCurrentFrame():expandTemplate{ | ||
title = "User:Saag/Sandbox/Ability card | title = "User:Saag/Sandbox/Ability card v2/Card", | ||
args = { | args = { | ||
hero_key = hero_key, | hero_key = hero_key, | ||
| Line 570: | Line 581: | ||
notes = notes, | notes = notes, | ||
notes_source_page = notes_source_page, | notes_source_page = notes_source_page, | ||
} | } | ||
} | } | ||
end | end | ||
return p | return p | ||