Cambios

Saltar a: navegación, buscar

Módulo:Grid

270 bytes añadidos, 19:11 28 abr 2014
sin resumen de edición
if alias then
local aliasFrames = {} for aliasFrame in mwtable.text.gsplitinsert( aliasframes, '%s*;%s*' ) do local aliasParts = p.getPartsexpandAlias( aliasFrame ) aliasParts.title = frameParts.title or aliasParts.title or '' aliasParts.mod = frameParts.mod or aliasParts.mod or 'Minecraft' aliasParts.num = frameParts.num or aliasParts.num or '' aliasParts.text = frameParts.text or aliasParts.text or '' aliasFrames[#aliasFrames + 1] = string.format( '[%s]%s:%s,%s[%s]', aliasParts.title, aliasParts.mod, aliasParts.name, aliasParts.num, aliasParts.text alias ) end frames[#frames + 1] = table.concat( aliasFrames, ';' )
else
table.insert( frames[#frames + 1] = , frame)
end
end
html = table.concat( html, '' ):gsub( ' "', '"' )
return html
end
 
function p.expandAlias( frameParts, alias )
-- If the frame has no parts, we can just return the alias as-is
if not frameParts.title and not frameParts.mod and not frameParts.num and not frameParts.text then
return alias
end
local expandedFrames = {}
for aliasFrame in mw.text.gsplit( alias, '%s*;%s*' ) do
local aliasParts = p.getParts( aliasFrame )
aliasParts.title = frameParts.title or aliasParts.title or ''
aliasParts.mod = frameParts.mod or aliasParts.mod or 'Minecraft'
aliasParts.num = frameParts.num or aliasParts.num or ''
aliasParts.text = frameParts.text or aliasParts.text or ''
table.insert( expandedFrames, string.format( '[%s]%s:%s,%s[%s]', aliasParts.title, aliasParts.mod, aliasParts.name, aliasParts.num, aliasParts.text ) )
end
return table.concat( expandedFrames, ';' )
end
end
if args.shapeless or '' ~= '' then
shapeless = '<span title="Los objetos de esta receta de manufacturación no tienen un orden establecidoThis recipe is shapeless; the inputs may be placed in any arrangement in the crafting grid.">[[File:Grid layout Shapeless.png|link=]]</span>'
end
2712
ediciones

Menú de navegación