2 545
modifications
Page créée avec « local general = require("Module:Infobox/Fonctions") -- Famille de compétences -- TODO: Revoir pour la couleur de Tech, qui n'apparaît pas -- clairement dans la bande-annonce family = function() local family = localdata["famille"] if family == nil then error("Paramètre « famille » absent") end local FAMILIES = { physique = {"Physique", "#3f5e40"}, social = {"Social", "#b08c42"}, combat = {"Combat", "#a7302e"}, science = {"Science", "#24698... » |
Couleurs plus fidèles à la réalité du jeu |
||
(9 versions intermédiaires par 3 utilisateurs non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
local general = require("Module:Infobox/Fonctions") | local general = require("Module:Infobox/Fonctions") | ||
local localdata = require("Module:Infobox/Localdata") | |||
-- Famille de compétences | -- Famille de compétences | ||
-- TODO: Revoir pour la couleur de Tech, qui n'apparaît pas | -- TODO: Revoir pour la couleur de Tech, qui n'apparaît pas | ||
-- clairement dans la bande-annonce | -- clairement dans la bande-annonce | ||
family = function() | family = function(localdata) | ||
local family = localdata["famille"] | local family = localdata["famille"] | ||
if family == nil then | if family == nil then | ||
Ligne 10 : | Ligne 11 : | ||
end | end | ||
local FAMILIES = { | local FAMILIES = { | ||
physique = {" | physique = {"PHYSIQUE", "#450E40"}, | ||
social = {" | social = {"SOCIAL", "#B08B42"}, | ||
combat = {" | combat = {"COMBAT", "#A7312D"}, | ||
science = {" | science = {"SCIENCE", "#236A8D"}, | ||
tech = {" | tech = {"TECH", "#6F558A"}, | ||
} | } | ||
local family_config = FAMILIES[family:lower()] | local family_config = FAMILIES[family:lower()] | ||
Ligne 24 : | Ligne 25 : | ||
end | end | ||
return tostring(mw.html.create("div") | return tostring(mw.html.create("div") | ||
:css("background-color", | :css("background-color", family_config[2]) | ||
:css("color", "white") | :css("color", "white") | ||
:css("font-weight", "bold") | :css("font-weight", "bold") | ||
:css("text-align", "center") | :css("text-align", "center") | ||
:wikitext( | :wikitext(family_config[1]) | ||
:done() | :done() | ||
) | ) | ||
Ligne 43 : | Ligne 44 : | ||
{type = "row", label = "Famille", value = family}, | {type = "row", label = "Famille", value = family}, | ||
{type = "row", label = "Effets", value = "effets"}, | {type = "row", label = "Effets", value = "effets"}, | ||
{type = "row", label = "Rang", value = "rang"}, | |||
}, | }, | ||
}, | }, |