因为以下原因,您没有权限编辑本页: 您所请求的操作仅限于这些用户组的用户使用:用户、FANDOM助手、Wiki主管、内容团队人员 您可以查看与复制此页面的源代码。 --<nowiki> local p = {} local games = { ["2D20"] = "Fallout 2d20", ["AR"] = "All Roads", ["D20"] = "Fallout Pen and Paper d20", ["FB"] = "Fallout Bible", ["FBG"] = "Fallout: The Board Game", ["FBGNC"] = "Fallout: New California", ["FILM"] = "Fallout (film)", ["FNV"] = "Fallout: New Vegas", ["FNVGRA"] = "Gun Runners' Arsenal", ["FNVDM"] = "Dead Money", ["FNVHH"] = "Honest Hearts", ["FNVOWB"] = "Old World Blues (add-on)", ["FNVLR"] = "Lonesome Road (add-on)", ["FO1"] = "Fallout", ["FO2"] = "Fallout 2", ["FO3"] = "Fallout 3", ["FO3OA"] = "Operation: Anchorage (add-on)", ["FO3TP"] = "The Pitt (add-on)", ["FO3BS"] = "Broken Steel", ["FO3PL"] = "Point Lookout (add-on)", ["FO3MZ"] = "Mothership Zeta (add-on)", ["FO4"] = "Fallout 4", ["FO4AUT"] = "Automatron (add-on)", ["FO4WW"] = "Wasteland Workshop", ["FO4FH"] = "Far Harbor (add-on)", ["FO4CW"] = "Contraptions Workshop", ["FO4VW"] = "Vault-Tec Workshop", ["FO4NW"] = "Nuka-World (add-on)", ["FO4VR"] = "Fallout 4 VR", ["FO4CC"] = "Creation Club", ["FO76"] = "Fallout 76", ["FO76WA"] = "Wild Appalachia", ["FO76NW"] = "Nuclear Winter", ["FO76WL"] = "Wastelanders", ["FO76LR"] = "The Legendary Run (update)", ["FO76OW"] = "One Wasteland For All", ["FO76FS"] = "Steel Dawn", ["FO76SD"] = "Steel Dawn", ["FO76LL"] = "Locked and Loaded", ["FO76SR"] = "Steel Reign", ["FOBOS"] = "Fallout: Brotherhood of Steel", ["FOBOS2"] = "Fallout: Brotherhood of Steel 2", ["FOS"] = "Fallout Shelter", ["FOSO"] = "Fallout Shelter Online", ["FOT"] = "Fallout Tactics", ["FOT2"] = "Fallout Tactics 2", ["FOTV"] = "Fallout television series", ["FOW"] = "Fallout: Warfare", ["FOX"] = "Fallout Extreme", ["FWW"] = "Fallout: Wasteland Warfare", ["FOWW"] = "Fallout: Wasteland Warfare", ["JES"] = "J.E. Sawyer's Fallout RPG", ["LH"] = "Lionheart", ["PA"] = "One Man, and a Crate of Puppets", ["PV13"] = "Project V13", ["TAR"] = "Project V13", ["TORN"] = "TORN", ["VB"] = "Van Buren", } -- look up short title without disambig function stitle(game) local result = games[game] if game ~= "FILM" then result = result:gsub('%s%(.*', '') end return result end -- ==================== -- This function, links, is for ordinary links within the body of -- an infobox. So if all you want returned is [[Fallout 4]], then -- use the syntax: -- {{#invoke:Games|links|{{{games|}}}}} -- specifying a second argument returns the text in italics: -- {{#invoke:Games|links|{{{games|}}}|1}} -- ==================== function p.links(frame) local result = '' local game_list = mw.text.split(frame.args[1], "%s*,%s*") for n, game in ipairs(game_list) do if game:lower() == "none" then result = '' else result = result .. '[[' .. games[game] .. '|' .. stitle(game) .. ']]' if n ~= #game_list then result = result .. '<br/>' end end end if (frame.args[2] and result ~= '') then return "''" .. result .. "''" else return result end end -- ==================== -- This function, title, generically generates links for the supertitle. -- Either just to the game page itself or to a more specific page. -- -- {{#invoke:Games|title|FO4}} gives just [[Fallout 4|Fallout 4]] -- {{#invoke:Games|title|FO4|weapons}} results in [[Fallout 4 weapons|Fallout 4]] -- {{#invoke:Games|title|FO4|weapons|weapon}} results in [[Fallout 4 weapons|Fallout 4 weapon]] -- ==================== function p.title(frame) local result = '' local game_list = mw.text.split(frame.args[1], "%s*,%s*") for n, game in ipairs(game_list) do if game:lower() == "none" then result = 'Mentioned-only' if frame.args[3] then result = result .. ' ' .. frame.args[3] end else local link if frame.args[2] then link = stitle(game) .. ' ' .. frame.args[2] else link = games[game] end local text = stitle(game) if frame.args[3] and n == #game_list then text = text .. ' ' .. frame.args[3] end result = result .. '[[' .. link .. '|' .. text .. ']]' if n ~= #game_list then result = result .. ' / ' end end end return result end return p --</nowiki> 该页面使用的模板: Template:Abb(查看源代码)(受保护)Template:Abb/doc(查看源代码)Template:Docparam(查看源代码)Template:Icon(查看源代码)Template:Mbox(查看源代码)(受保护)Template:Template dependencies(查看源代码)Template:Tl(查看源代码)模块:Games/doc(查看源代码)模块:Icons(查看源代码)返回至模块:Games。