43 002
modifications
m (séparation des lieux détaillés avec des puces) |
(Les miniatures dans les tableaux détaillés (en cas de mutilples formes) sont désormais adaptées aux jeux en question) |
||
Ligne 124 : | Ligne 124 : | ||
local borders = {} | local borders = {} | ||
local game_displays = {} | local game_displays = {} | ||
local game_minisprites = {} | |||
local game_links = {} | local game_links = {} | ||
local locdatas = {} | local locdatas = {} | ||
Ligne 129 : | Ligne 130 : | ||
borders[game] = frame:expandTemplate{title='Bordure', args={game}} | borders[game] = frame:expandTemplate{title='Bordure', args={game}} | ||
game_displays[game] = game_to_game_long[game] | game_displays[game] = game_to_game_long[game] | ||
local game_minisprite = game | |||
if game == "RV" or game == "RB" or game == "B-JP" or game == "B-jp" or game == "J" or game == "OA" or game == "C" | |||
then game_minisprite = "RS" | |||
elseif game == "Démo-ROSA" | |||
then game_minisprite = "ROSA" | |||
elseif game == "Démo-SL" | |||
then game_minisprite = "SL" | |||
end | |||
game_minisprite = " jeu(" .. game_minisprite .. ")" | |||
game_minisprites[game] = game_minisprite | |||
local game_link = game_to_game_long[game] | local game_link = game_to_game_long[game] | ||
if game ~= "LPA" | if game ~= "LPA" | ||
Ligne 639 : | Ligne 652 : | ||
local templates_replaced = 0 | local templates_replaced = 0 | ||
while template_replacement ~= endroit[2] and templates_replaced < 4 do -- pour empêcher une boucle infinie en cas de pépin, 4 modèles max devraient suffire | while template_replacement ~= endroit[2] and templates_replaced < 4 do -- pour empêcher une boucle infinie en cas de pépin, 4 modèles max devraient suffire | ||
local | local arg_template_replacement = endroit[2]:gsub(".*{{(.-)|(.-)}}.*", "%2") | ||
local template_result = frame:expandTemplate{title=template_replacement, args={ | local template_result = frame:expandTemplate{title=template_replacement, args={arg_template_replacement}} | ||
endroit[2] = endroit[2]:gsub("(.*){{(.-)|(.-)}}(.*)", "%1" .. template_result .. "%4") | endroit[2] = endroit[2]:gsub("(.*){{(.-)|(.-)}}(.*)", "%1" .. template_result .. "%4") | ||
Ligne 654 : | Ligne 667 : | ||
if multiple_ids | if multiple_ids | ||
then if id | then if id | ||
then table.insert(current_subarea_full_locations, "<td>" .. ressources.infosPokemon(id, "miniature") .. "</td>") | then table.insert(current_subarea_full_locations, "<td>" .. ressources.infosPokemon(id .. game_minisprites[current_game], "miniature") .. "</td>") | ||
else table.insert(current_subarea_full_locations, "<td></td>") | else table.insert(current_subarea_full_locations, "<td></td>") | ||
end | end | ||
Ligne 728 : | Ligne 741 : | ||
if not game_long then return "<i>Erreur : jeu invalide.</i>" end | if not game_long then return "<i>Erreur : jeu invalide.</i>" end | ||
local game_minisprite = game | |||
if game == "RV" or game == "RB" or game == "B-JP" or game == "B-jp" or game == "J" or game == "OA" or game == "C" | |||
then game_minisprite = "RS" | |||
elseif game == "Démo-ROSA" | |||
then game_minisprite = "ROSA" | |||
elseif game == "Démo-SL" | |||
then game_minisprite = "SL" | |||
end | |||
game_minisprite = " jeu(" .. game_minisprite .. ")" | |||
game_minisprites[game] = game_minisprite | |||
if game ~= "LPA" | if game ~= "LPA" | ||
then game_long = "Pokémon " .. game_to_game_long[game] | then game_long = "Pokémon " .. game_to_game_long[game] | ||
Ligne 748 : | Ligne 774 : | ||
for pokemon, places in pairs(pokemon_global_list) do | for pokemon, places in pairs(pokemon_global_list) do | ||
table.insert(result, '<tr><td>' .. ressources.infosPokemon(pokemon) .. '</td><td>' .. pokemon .. '</td><td>' .. places .. '</td></tr>') | table.insert(result, '<tr><td>' .. ressources.infosPokemon(pokemon .. game_minisprite) .. '</td><td>' .. pokemon .. '</td><td>' .. places .. '</td></tr>') | ||
end | end | ||