Editing Module:Shared VA
Appearance
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 20: | Line 20: | ||
} | } | ||
local iw_links = { | local iw_links = { | ||
[" | ["zzz"] = "[[w:c:zenless-zone-zero:%s|%s]]", | ||
["hsr"] = "[[w:c:honkai-star-rail:%s|%s]]", | ["hsr"] = "[[w:c:honkai-star-rail:%s|%s]]", | ||
["hi3"] = "[[w:c:honkaiimpact3:%s|%s]]", | ["hi3"] = "[[w:c:honkaiimpact3:%s|%s]]", | ||
["hg2"] = "[[w:c:houkai2nd:%s|%s]]", | ["hg2"] = "[[w:c:houkai2nd:%s|%s]]", | ||
["hna"] = "[https://hna.wiki/%s %s]", | ["hna"] = "[https://hna.wiki/%s %s]", | ||
["gi"] = "[ | ["gi"] = "[[w:c:genshin-impact:%s|%s]]", | ||
[" | ["pp"] = "[https://petitplanet.wiki/%s %s]", | ||
["tot"] = "[https://tot.wiki/wiki/%s %s]", | ["tot"] = "[https://tot.wiki/wiki/%s %s]", | ||
} | } | ||
local game_order = {' | local game_order = {'hsr', 'hi3', 'hg2', 'hna', 'gi', 'zzz', 'pp', 'tot'} | ||
local lang_order = {'EN', 'CN', 'JP', 'KR'} | local lang_order = {'EN', 'CN', 'JP', 'KR'} | ||
| Line 44: | Line 44: | ||
function p._main(args, frame) | function p._main(args, frame) | ||
local VAs = {character = args['char']} | local VAs = {character = args['char']} | ||
local data = Parse(args['char'], {only=' | local data = Parse(args['char'], {only='Character Infobox'}) or {} | ||
local out = mw.html.create('ul') | local out = mw.html.create('ul') | ||
| Line 54: | Line 54: | ||
or (lib.isNotEmpty(va) and | or (lib.isNotEmpty(va) and | ||
frame:preprocess(lib.trim( | frame:preprocess(lib.trim( | ||
VAs.character=='Trailblazer' | VAs.character=='Trailblazer' | ||
and (va:gsub('^.-F: (.-)<r?b?.-M: (.+)$', '%1 or %2'):gsub('%s*<ref.+$', '')) | and (va:gsub('^.-F: (.-)<r?b?.-M: (.+)$', '%1 or %2'):gsub('%s*<ref.+$', '')) | ||
or (va:gsub('%s*<ref.+$', '')) | or (va:gsub('%s*<ref.+$', '')) | ||