Diferencia entre revisiones de «Módulo:Crafting»
Página creada con «local p = {} function p.table( f ) local args = f if f == mw.getCurrentFrame() then args = require( 'Module:ProcessArgs' ).merge() else f = mw.getCurrentFrame() end...» |
Sin resumen de edición |
||
| (No se muestran 68 ediciones intermedias de 4 usuarios) | |||
| Línea 40: | Línea 40: | ||
local description = '' | local description = '' | ||
if args.showname == '1' or multirow and args.showname ~= '0' then | if args.showname == '1' or multirow and args.showname ~= '0' then | ||
name = ' | name = 'Nombre !! ' | ||
f:callParserFunction( '#dplvar:set', 'craftingname', '1' ) | f:callParserFunction( '#dplvar:set', 'craftingname', '1' ) | ||
end | end | ||
if args.showdescription == '1' then | if args.showdescription == '1' then | ||
description = ' !! class="unsortable" | | description = ' !! class="unsortable" | Descripción' | ||
f:callParserFunction( '#dplvar:set', 'craftingdescription', '1' ) | f:callParserFunction( '#dplvar:set', 'craftingdescription', '1' ) | ||
end | end | ||
| Línea 55: | Línea 55: | ||
header = table.concat( { | header = table.concat( { | ||
' {| class="wikitable ' .. class .. '"', | ' {| class="wikitable ' .. class .. '"', | ||
'! ' .. name .. ' | '! ' .. name .. 'Ingredientes !! ' .. recipeClass .. ' Receta de [[fabricación]]' .. description, | ||
'|-' | '|-' | ||
}, '\n' ) | }, '\n' ) | ||
| Línea 86: | Línea 86: | ||
end | end | ||
nameCell = table.concat( links, ' | nameCell = table.concat( links, ' o<br>' ) | ||
end | end | ||
end | end | ||
| Línea 141: | Línea 141: | ||
separator = '' | separator = '' | ||
elseif animatedIngredients[v] and not animatedIngredients[v].final then | elseif animatedIngredients[v] and not animatedIngredients[v].final then | ||
separator = ' | separator = ' o' | ||
end | end | ||
local mod = ( ingredients[v] or animatedIngredients[v] ).mod | local mod = ( ingredients[v] or animatedIngredients[v] ).mod | ||
| Línea 260: | Línea 260: | ||
if args.upcoming then | if args.upcoming then | ||
table.insert( categories, '[[Category: | table.insert( categories, '[[Category:Proximamente]]' ) | ||
end | end | ||
if args.type then | |||
table.insert( categories, '[[Category:' .. args.type .. ' receta]]' ) | |||
end | |||
if args.ignoreusage ~= '1' then | if args.ignoreusage ~= '1' then | ||
| Línea 267: | Línea 271: | ||
v = v:sub( 2 ) | v = v:sub( 2 ) | ||
if not v:find( ':' ) then | if not v:find( ':' ) then | ||
if v == ' | if v == 'Tintes' then | ||
for _, tinte in ipairs( { | |||
'Tinte naranja', 'Tinte magenta', 'Tinte azul claro', 'Tinte amarillo', 'Tinte verde lima', | |||
'Tinte rosa', 'Tinte gris', 'Tinte gris claro', 'Tinte cian', 'Tinte morado', | |||
'Lapislázuli', 'Semillas de cacao', 'Tinte verde', 'Tinte rojo', 'Saco de tinta' | |||
} ) do | |||
table.insert( categories, '[[Categoría:Recetas que usan ' .. tinte .. ']]' ) | |||
end | |||
else | |||
if v == 'Pistón adhesivo' then v = 'Pistón' | |||
elseif v == 'Champiñón rojo' or v == 'Champiñón marrón' then v = 'Champiñón' | |||
elseif v == 'Champiñón Rojo' or v == 'Champiñón Marrón' then v = 'Champiñón' | |||
elseif v == 'Arena Rojiza' then v = 'Arena' | |||
elseif v == 'Arena roja' then v = 'Arena' | |||
elseif v == 'Carbón vegetal' then v = 'Carbón' | |||
elseif v == 'Carbón Vegetal' then v = 'Carbón' | |||
elseif v:find( ' Tronco de madera$' ) then v = 'Madera' | |||
elseif v:find( ' Tronco de Madera$' ) then v = 'Madera' | |||
elseif v:find( ' Tablas de madera$' ) then v = 'Tablas de madera' | |||
elseif v:find( ' Tablas de Madera$' ) then v = 'Tablas de Madera' | |||
elseif v:find( ' Materiales$' ) then v = 'Materiales para herramientas' | |||
elseif v:find( ' Cristal tintado$' ) then v = 'Cristal tintado' | |||
elseif v:find( ' Cristal Tintado$' ) then v = 'Cristal Tintado' | |||
elseif v:find( ' Panel de cristal tintado$' ) then v = 'Panel de cristal tintado' | |||
elseif v:find( ' Panel de Cristal Tintado$' ) then v = 'Panel de Cristal Tintado' | |||
elseif v:find( ' Lana$' ) then v = 'Lana' | |||
elseif v:find( ' Arenisca$' ) then v = 'Arenisca' | |||
elseif v:find( ' Escaleras de madera$' ) then v = 'Escaleras' | |||
elseif v:find( ' Escaleras de Madera$' ) then v = 'Escaleras' | |||
elseif v:find( ' Losa de madera$' ) then v = 'Losas' | |||
elseif v:find( ' Losa de Madera$' ) then v = 'Losas' | |||
elseif v:find( ' Placa de presión$' ) then v = 'Placa de presión' | |||
elseif v:find( ' Placa de Presión$' ) then v = 'Placa de Presión' | |||
elseif v:find( ' Tulipán$' ) then v = 'Tulipán' | |||
elseif v:find( ' Estrella de fuegos artificiales$' ) then v = 'Estrella de fuegos artificiales' | |||
elseif v:find( ' Estrella de Fuegos Artificiales$' ) then v = 'Estrella de Fuegos Artificiales' | |||
elseif v:find( ' Ladrillos de piedra$' ) then v = 'Ladrillos de piedra' | |||
elseif v:find( ' Ladrillos de Piedra$' ) then v = 'Ladrillos de Piedra' | |||
elseif v:find( ' Bloques de cuarzo$' ) then v = 'Bloque de cuarzo' | |||
elseif v:find( ' Bloques de Cuarzo$' ) then v = 'Bloque de Cuarzo' | |||
elseif v:find( ' Andesita$' ) then v = 'Andesite' | |||
elseif v:find( ' Diorita$' ) then v = 'Diorite' | |||
elseif v:find( ' Granito$' ) then v = 'Granite' | |||
end | |||
table.insert( categories, '[[Categoría:Recetas que usan ' .. v .. ']]' ) | |||
end | end | ||
end | end | ||
end | end | ||