Version actuelle |
Votre texte |
Ligne 1 : |
Ligne 1 : |
| local p = {} | | local p = {} |
|
| |
| ------------------------------------------------------
| |
| ----- Référentiel des bandeaux de source -----
| |
| ------------------------------------------------------
| |
|
| |
| local data = {
| |
| ["ASC"] = {
| |
| image = "FO76 Atomic shop logo.png",
| |
| link = "Boutique Atomique",
| |
| source = "du contenu présent dans la [[boutique Atomique]]",
| |
| text = "vide"
| |
| },
| |
| ["Bogué"] = {
| |
| image = "Icon repair.png",
| |
| link = "Bogues",
| |
| source = "du contenu bogué"
| |
| },
| |
| ["Contenu à venir"] = {
| |
| image = "mbox_upcoming.png",
| |
| source = "du contenu à venir",
| |
| text = "avant-première"
| |
| },
| |
| ["Contenu inutilisé"] = {
| |
| image = "Icon_cut.png",
| |
| link = "Contenu inutilisé",
| |
| source = "du contenu inutilisé"
| |
| },
| |
| ["CCC"] = {
| |
| image = "Creation_Club_logo.jpg",
| |
| link = "Creation Club",
| |
| source = "le contenu présent dans le [[Creation Club]]",
| |
| text = "contradiction"
| |
| },
| |
| ["D20"] = {
| |
| image = "Gametitle-D20.png",
| |
| link = "Fallout Pen and Paper d20",
| |
| source = "le contenu du jeu de rôle ''[[Fallout Pen and Paper d20|Fallout PnP d20]]''"
| |
| },
| |
| ["Fangame"] = {
| |
| image = "Rushok.gif",
| |
| link = "",
| |
| source = "le contenu d'un ''[[:Catégorie:fangame|fangame]]''",
| |
| text = 'hors-contenu'
| |
| },
| |
| ["Fixt"] = {
| |
| image = "Fallout fixt.jpg",
| |
| link = "Fallout FIXT",
| |
| source = "le contenu restauré par le ''[[Fallout Fixt]]'' traduit par l'équipe de Fallout Génération"
| |
| },
| |
| ["FNVCS"] = {
| |
| image = "Icon_cut.png",
| |
| link = "Contenu inutilisé de Fallout: New Vegas",
| |
| source = "le contenu inutilisé de ''[[Fallout: New Vegas]]''"
| |
| },
| |
| ["FNVTS"] = {
| |
| image = "Terres sauvages.png",
| |
| link = "Terres sauvages",
| |
| source = "le [[trait]] [[Terres sauvages]] de ''[[Fallout: New Vegas]]''"
| |
| },
| |
| ["FO1CS"] = {
| |
| image = "Icon_cut.png",
| |
| link = "Contenu inutilisé de Fallout",
| |
| source = "le contenu inutilisé de ''[[Fallout]]''"
| |
| },
| |
| ["FO2CS"] = {
| |
| image = "Icon_cut.png",
| |
| link = "Contenu inutilisé de Fallout 2",
| |
| source = "le contenu inutilisé de ''[[Fallout 2]]''"
| |
| },
| |
| ["FO3CS"] = {
| |
| image = "Icon_cut.png",
| |
| link = "Contenu inutilisé de Fallout 3",
| |
| source = "le contenu inutilisé de ''[[Fallout 3]]''"
| |
| },
| |
| ["FO4CS"] = {
| |
| image = "Icon_cut.png",
| |
| link = "Contenu inutilisé de Fallout 4",
| |
| source = "le contenu inutilisé de ''[[Fallout 4]]''"
| |
| },
| |
| ["FO76CC"] = {
| |
| image = "Icon_limitedtime.png",
| |
| link = "Contenu supprimé de Fallout 76",
| |
| source = "le [[Contenu supprimé de Fallout 76|contenu supprimé de ''Fallout 76'']]",
| |
| text = "vide"
| |
| },
| |
| ["FO76CH"] = {
| |
| image = "Icon_limitedtime.png",
| |
| link = "Contenu héritage de Fallout 76",
| |
| source = "le [[Contenu héritage de Fallout 76|contenu héritage]] de ''[[Fallout 76]]''"
| |
| },
| |
| ["FO76INU"] = {
| |
| image = "Icon_cut.png",
| |
| link = "Contenu inutilisé de Fallout 76",
| |
| source = "le contenu inutilisé de ''[[Fallout 76]]''"
| |
| },
| |
| ["FO76LTC"] = {
| |
| image = "FO76 Quest Old Man Winter.png",
| |
| link = "Saisons de Fallout 76",
| |
| source = "le contenu saisonnier de ''[[Fallout 76]]''",
| |
| text = "vide"
| |
| },
| |
| ["FO76PTS"] = {
| |
| image = "mbox_upcoming.png",
| |
| source = "le contenu présent sur le serveur public de test de ''[[Fallout 76]]''",
| |
| text = "avant-première"
| |
| },
| |
| ["FO76UP"] = {
| |
| image = "mbox_upcoming.png",
| |
| source = "le prochain contenu de ''[[Fallout 76]]''",
| |
| text = "avant-première"
| |
| },
| |
| ["FOBOS"] = {
| |
| image = "FOBOS Logo mini.png",
| |
| link = "Fallout: Brotherhood of Steel",
| |
| source = "le contenu de ''[[Fallout: Brotherhood of Steel]]''"
| |
| },
| |
| ["FOT"] = {
| |
| image = "FOT Logo mini.png",
| |
| link = "Fallout Tactics",
| |
| source = "le contenu de ''[[Fallout Tactics]]''",
| |
| text = "semi"
| |
| },
| |
| ["JSawyer"] = {
| |
| image = "Gametitle-JES.png",
| |
| link = "JSawyer",
| |
| source = "le mod [[JSawyer]] pour ''[[Fallout: New Vegas]]''"
| |
| },
| |
| ["JSE"] = {
| |
| image = "Gametitle-JES.png",
| |
| link = "J.E. Sawyer's Fallout Role-Playing Game",
| |
| source = "le jeu de rôle ''[[J.E. Sawyer's Fallout Role-Playing Game|J.E. Sawyer's Fallout RPG]]''"
| |
| },
| |
| ["Van Buren"] = {
| |
| image = "Van_Buren.png",
| |
| link = "Van Buren",
| |
| source = "le contenu de ''[[Van Buren]]''"
| |
| }
| |
| }
| |
|
| |
| -----------------------------------------------------
| |
|
| |
|
| function p.build(frame) | | function p.build(frame) |
| local args = {} | | local data = require( 'Module:Bandeau de source/Données' )[frame.args.nom] |
| args.nom = frame.args.nom
| |
|
| |
| local argsParent = frame:getParent().args
| |
| for cle, val in pairs(argsParent) do
| |
| if val then
| |
| args[cle] = mw.text.trim(val)
| |
| end
| |
| end
| |
|
| |
| return p._build(args)
| |
| end
| |
|
| |
|
| function p._build(args)
| | local arg = frame.args[1] or '' |
| local banner = data[args.nom] | | local text = '' |
| | | |
| local bannerType = args[1] or ''
| | if arg == 'fin' then |
| local source = banner.source or 'source ?'
| | text = 'Fin des informations basées sur ' .. ( data.source or 'source ?' ) .. '.' |
| local link = banner.link or ''
| |
| local image = banner.image or 'bandeau de source - defaut.png'
| |
| local text = banner.text or ''
| |
|
| |
| local bannerText = ''
| |
|
| |
| if bannerType:lower() == 'fin' then | |
| bannerText = 'Fin des informations basées sur ' .. source .. '.' | |
| else | | else |
| bannerText = 'Les informations suivantes se basent sur ' .. source | | text = 'Les informations suivantes se basent sur ' .. ( data.source or 'source ?' ) |
| | | |
| if text == 'vide' then | | if text == 'vide' then |
| bannerText = bannerText .. '.' | | text = text .. '.' |
| elseif text == 'contradiction' then | | elseif text == 'contradiction' then |
| bannerText = bannerText .. ' et sont contredites par les sources officielles.' | | text = text .. ' et sont contredites par les sources officielles.' |
| elseif text == 'avant-première' then | | elseif text == 'avant-première' then |
| bannerText = bannerText .. ' et peuvent être inexactes ou contenir des \'\'spoilers\'\'.' | | text = text .. ' et peuvent être inexactes ou contenir des \'\'spoilers\'\'.' |
| elseif text == 'semi' then | | elseif text == 'semi' then |
| bannerText = bannerText .. ' et peuvent être contredites par les sources officielles.' | | text = text .. ' et certains détails peuvent contredire les sources officielles.' |
| elseif text == 'hors-contenu' then
| |
| bannerText = bannerText .. ' et n\'appartiennent pas au contenu officiel de la [[Licence Fallout|licence]].'
| |
| else | | else |
| bannerText = bannerText .. ' et n\'ont pas été confirmées par des sources officielles.' | | text = text .. ' et n\'ont pas été confirmées par des sources officielles.' |
| end | | end |
| end | | end |
| | | |
| return mw.html.create( 'div' ) | | return mw.html.create( 'div' ) |
| :addClass( 'avt-source-banner noexcerpt' ) | | :addClass( 'avt-source-banner' ) |
| :tag( 'div' ) | | :tag( 'div' ) |
| :addClass( 'avt-source-banner-img' ) | | :addClass( 'avt-source-banner-img' ) |
| :wikitext( '[[Fichier:' .. image .. '|x25px|link=' .. link .. '|alt=]]' ) | | :wikitext( '[[Fichier:' .. data.image .. '|x25px|link=' .. (data.link or '') .. ']]' ) |
| :done() | | :done() |
| :tag( 'div' ) | | :tag( 'p' ) |
| :addClass( 'avt-source-banner-text' ) | | :addClass( 'avt-source-banner-text' ) |
| :wikitext( bannerText ) | | :wikitext( text ) |
| :allDone() | | :allDone() |
| end | | end |
|
| |
|
| return p | | return p |