m (Arkadyos a renommé la page Module:Jeux en Module:Games sans laisser de redirection) |
Aucun résumé des modifications |
||
(14 versions intermédiaires par 2 utilisateurs non affichées) | |||
Ligne 7 : | Ligne 7 : | ||
["D20"] = "Fallout Pen and Paper d20", |
["D20"] = "Fallout Pen and Paper d20", |
||
["FB"] = "Fallout Bible", |
["FB"] = "Fallout Bible", |
||
− | [" |
+ | ["FJP"] = "Fallout: Le Jeu de Plateau", |
− | [" |
+ | ["FJPNC"] = "Fallout: New California", |
["FILM"] = "Fallout (film)", |
["FILM"] = "Fallout (film)", |
||
["FNV"] = "Fallout: New Vegas", |
["FNV"] = "Fallout: New Vegas", |
||
Ligne 14 : | Ligne 14 : | ||
["FNVDM"] = "Dead Money", |
["FNVDM"] = "Dead Money", |
||
["FNVHH"] = "Honest Hearts", |
["FNVHH"] = "Honest Hearts", |
||
− | ["FNVOWB"] = "Old World Blues ( |
+ | ["FNVOWB"] = "Old World Blues (extension)", |
− | ["FNVLR"] = "Lonesome Road ( |
+ | ["FNVLR"] = "Lonesome Road (extension)", |
["FO1"] = "Fallout", |
["FO1"] = "Fallout", |
||
["FO2"] = "Fallout 2", |
["FO2"] = "Fallout 2", |
||
["FO3"] = "Fallout 3", |
["FO3"] = "Fallout 3", |
||
− | ["FO3OA"] = "Operation: Anchorage ( |
+ | ["FO3OA"] = "Operation: Anchorage (extension)", |
− | ["FO3TP"] = "The Pitt ( |
+ | ["FO3TP"] = "The Pitt (extension)", |
["FO3BS"] = "Broken Steel", |
["FO3BS"] = "Broken Steel", |
||
− | ["FO3PL"] = "Point Lookout ( |
+ | ["FO3PL"] = "Point Lookout (extension)", |
− | ["FO3MZ"] = "Mothership Zeta ( |
+ | ["FO3MZ"] = "Mothership Zeta (extension)", |
["FO4"] = "Fallout 4", |
["FO4"] = "Fallout 4", |
||
− | ["FO4AUT"] = "Automatron ( |
+ | ["FO4AUT"] = "Automatron (extension)", |
["FO4WW"] = "Wasteland Workshop", |
["FO4WW"] = "Wasteland Workshop", |
||
− | ["FO4FH"] = "Far Harbor ( |
+ | ["FO4FH"] = "Far Harbor (extension)", |
["FO4CW"] = "Contraptions Workshop", |
["FO4CW"] = "Contraptions Workshop", |
||
["FO4VW"] = "Vault-Tec Workshop", |
["FO4VW"] = "Vault-Tec Workshop", |
||
− | ["FO4NW"] = "Nuka-World ( |
+ | ["FO4NW"] = "Nuka-World (extension)", |
["FO4VR"] = "Fallout 4 VR", |
["FO4VR"] = "Fallout 4 VR", |
||
["FO4CC"] = "Creation Club", |
["FO4CC"] = "Creation Club", |
||
Ligne 37 : | Ligne 37 : | ||
["FO76NW"] = "Nuclear Winter", |
["FO76NW"] = "Nuclear Winter", |
||
["FO76WL"] = "Wastelanders", |
["FO76WL"] = "Wastelanders", |
||
+ | ["FO76LR"] = "La Course Légendaire", |
||
+ | ["FO76OW"] = "Terres désolées pour tous", |
||
+ | ["FO76SD"] = "Aube d'Acier", |
||
["FOBOS"] = "Fallout: Brotherhood of Steel", |
["FOBOS"] = "Fallout: Brotherhood of Steel", |
||
["FOBOS2"] = "Fallout: Brotherhood of Steel 2", |
["FOBOS2"] = "Fallout: Brotherhood of Steel 2", |
||
Ligne 45 : | Ligne 48 : | ||
["FOX"] = "Fallout Extreme", |
["FOX"] = "Fallout Extreme", |
||
["FWW"] = "Fallout: Wasteland Warfare", |
["FWW"] = "Fallout: Wasteland Warfare", |
||
− | ["JES"] = "J.E. Sawyer |
+ | ["JES"] = "Jeu de Rôle Fallout de J.E. Sawyer", |
["LH"] = "Lionheart", |
["LH"] = "Lionheart", |
||
["PA"] = "One Man, and a Crate of Puppets", |
["PA"] = "One Man, and a Crate of Puppets", |
||
Ligne 77 : | Ligne 80 : | ||
local game_list = mw.text.split(frame.args[1], "%s*,%s*") |
local game_list = mw.text.split(frame.args[1], "%s*,%s*") |
||
for n, game in ipairs(game_list) do |
for n, game in ipairs(game_list) do |
||
− | if game:lower() == " |
+ | if game:lower() == "aucun" then |
result = '' |
result = '' |
||
else |
else |
||
Ligne 108 : | Ligne 111 : | ||
local game_list = mw.text.split(frame.args[1], "%s*,%s*") |
local game_list = mw.text.split(frame.args[1], "%s*,%s*") |
||
for n, game in ipairs(game_list) do |
for n, game in ipairs(game_list) do |
||
− | if game:lower() == " |
+ | if game:lower() == "aucun" then |
− | result = ' |
+ | result = 'uniquement mentionné(e)' |
if frame.args[3] then |
if frame.args[3] then |
||
− | result = |
+ | result = frame.args[3] .. ' ' .. result |
end |
end |
||
else |
else |
Version du 4 novembre 2020 à 11:23
La documentation pour ce module peut être créée à Module:Jeux/doc
--<nowiki>
local p = {}
local games = {
["AR"] = "All Roads",
["D20"] = "Fallout Pen and Paper d20",
["FB"] = "Fallout Bible",
["FJP"] = "Fallout: Le Jeu de Plateau",
["FJPNC"] = "Fallout: New California",
["FILM"] = "Fallout (film)",
["FNV"] = "Fallout: New Vegas",
["FNVGRA"] = "Gun Runners' Arsenal",
["FNVDM"] = "Dead Money",
["FNVHH"] = "Honest Hearts",
["FNVOWB"] = "Old World Blues (extension)",
["FNVLR"] = "Lonesome Road (extension)",
["FO1"] = "Fallout",
["FO2"] = "Fallout 2",
["FO3"] = "Fallout 3",
["FO3OA"] = "Operation: Anchorage (extension)",
["FO3TP"] = "The Pitt (extension)",
["FO3BS"] = "Broken Steel",
["FO3PL"] = "Point Lookout (extension)",
["FO3MZ"] = "Mothership Zeta (extension)",
["FO4"] = "Fallout 4",
["FO4AUT"] = "Automatron (extension)",
["FO4WW"] = "Wasteland Workshop",
["FO4FH"] = "Far Harbor (extension)",
["FO4CW"] = "Contraptions Workshop",
["FO4VW"] = "Vault-Tec Workshop",
["FO4NW"] = "Nuka-World (extension)",
["FO4VR"] = "Fallout 4 VR",
["FO4CC"] = "Creation Club",
["FO76"] = "Fallout 76",
["FO76WA"] = "Wild Appalachia",
["FO76NW"] = "Nuclear Winter",
["FO76WL"] = "Wastelanders",
["FO76LR"] = "La Course Légendaire",
["FO76OW"] = "Terres désolées pour tous",
["FO76SD"] = "Aube d'Acier",
["FOBOS"] = "Fallout: Brotherhood of Steel",
["FOBOS2"] = "Fallout: Brotherhood of Steel 2",
["FOS"] = "Fallout Shelter",
["FOT"] = "Fallout Tactics",
["FOT2"] = "Fallout Tactics 2",
["FOW"] = "Fallout: Warfare",
["FOX"] = "Fallout Extreme",
["FWW"] = "Fallout: Wasteland Warfare",
["JES"] = "Jeu de Rôle Fallout de J.E. Sawyer",
["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() == "aucun" 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() == "aucun" then
result = 'uniquement mentionné(e)'
if frame.args[3] then
result = frame.args[3] .. ' ' .. result
end
else
local link
if frame.args[2] then
link = frame.args[2] .. ' de ' ..stitle(game)
else
link = games[game]
end
local text = stitle(game)
if frame.args[3] and n == #game_list then
text = frame.args[3] .. ' de ' .. text
end
result = result .. '[[' .. link .. '|' .. text .. ']]'
if n ~= #game_list then
result = result .. ' / '
end
end
end
return result
end
return p
--</nowiki>