« Module:Réactions » : différence entre les versions

113 octets enlevés ,  24 mars 2022
aucun résumé des modifications
Kharmitch (discussion | contributions)
Page créée avec « local p = {} local tooltip = require( 'Module:Infobulle' ) _NPC = { 'cait', 'codsworth', 'curie', 'danse', 'deacon', 'hancock', 'maccready', 'piper', 'preston', 'strong', 'valentine', 'x688', 'longfellow', 'gage', } _REACTIONS = { ["adore"] = "sans_cadre|15px|alt=Adore|link=|Adore", ["aime"] = "sans_cadre|15px|alt=Aime|link=|Aime", ["indifférent"] = "[[Fichier:Indifférent.png|sans_cadre|15px|alt=Ind... »
 
Kharmitch (discussion | contributions)
Aucun résumé des modifications
 
Ligne 60 : Ligne 60 :
local row = '<tr><td>' .. event .. '</td>'
local row = '<tr><td>' .. event .. '</td>'
for i, v in ipairs(_NPC) do
for i, v in ipairs(_NPC) do
npc_reaction = args[v]
npc_reaction = args[v] or 'indifférent'
if not npc_reaction then
reaction = _REACTIONS[npc_reaction] or npc_reaction
npc_reaction = 'indifférent'
end
reaction = _REACTIONS[npc_reaction]
if not reaction then
error('Réaction inconnu : ' .. npc_reaction, 0)
end
row = row .. '<td>' .. reaction .. '</td>'
row = row .. '<td>' .. reaction .. '</td>'
end
end
Bureaucrate, commentadmin, emailconfirmed, Administrateurs d’interface, staff, Administrateur
62 734

modifications