Diferencia entre revisiones de «Módulo:Crafting»
Sin resumen de edición |
Sin resumen de edición |
||
| 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 = 'Name !! ' | ||
f:callParserFunction( '#dplvar:set', 'craftingname', '1' ) | f:callParserFunction( '#dplvar:set', 'craftingname', '1' ) | ||
end | end | ||
| Línea 55: | Línea 55: | ||
header = table.concat( { | header = table.concat( { | ||
' {| class="wikitable ' .. class .. '"', | ' {| class="wikitable ' .. class .. '"', | ||
'! ' .. name .. ' | '! ' .. name .. 'Ingredients !! ' .. recipeClass .. ' [[Crafting]] recipe' .. description, | ||
'|-' | '|-' | ||
}, '\n' ) | }, '\n' ) | ||
| Línea 86: | Línea 86: | ||
end | end | ||
nameCell = table.concat( links, ' | nameCell = table.concat( links, ' or<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 = ' or' | ||
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:Upcoming]]' ) | ||
end | end | ||
if args.ignoreusage ~= '1' then | if args.ignoreusage ~= '1' then | ||
| Línea 271: | Línea 267: | ||
v = v:sub( 2 ) | v = v:sub( 2 ) | ||
if not v:find( ':' ) then | if not v:find( ':' ) then | ||
if v == ' | if v == 'Any Dye' then | ||
for _, | for _, dye in ipairs( { | ||
' | 'Orange Dye', 'Magenta Dye', 'Light Blue Dye', 'Dandelion Yellow', 'Lime Dye', | ||
' | 'Pink Dye', 'Gray Dye', 'Light Gray Dye', 'Cyan Dye', 'Purple Dye', | ||
' | 'Lapis Lazuli', 'Cocoa Beans', 'Cactus Green', 'Rose Red', 'Ink Sac' | ||
} ) do | } ) do | ||
table.insert( categories, '[[ | table.insert( categories, '[[Category:Recipe using ' .. dye .. ']]' ) | ||
end | end | ||
else | else | ||
if v == ' | if v == 'Sticky Piston' then v = 'Piston' | ||
elseif v == ' | elseif v == 'Red Mushroom' or v == 'Brown Mushroom' then v = 'Mushroom' | ||
elseif v == ' | elseif v == 'Red Sand' then v = 'Sand' | ||
elseif v == ' | elseif v == 'Charcoal' then v = 'Coal' | ||
elseif v:find( ' | elseif v:find( ' Wood$' ) then v = 'Wood' | ||
elseif v:find( ' | elseif v:find( ' Wood Planks$' ) then v = 'Wood Planks' | ||
elseif v:find( ' Stained Glass$' ) then v = 'Stained Glass' | |||
elseif v:find( ' | elseif v:find( ' Stained Glass Pane$' ) then v = 'Stained Glass Pane' | ||
elseif v:find( ' | elseif v:find( ' Wool$' ) then v = 'Wool' | ||
elseif v:find( ' | elseif v:find( ' Sandstone$' ) then v = 'Sandstone' | ||
elseif v:find( ' | elseif v:find( ' Stairs$' ) then v = 'Stairs' | ||
elseif v:find( ' | elseif v:find( ' Slab$' ) then v = 'Slab' | ||
elseif v:find( ' | elseif v:find( ' Pressure Plate$' ) then v = 'Pressure Plate' | ||
elseif v:find( ' | elseif v:find( ' Tulip$' ) then v = 'Tulip' | ||
elseif v:find( ' | elseif v:find( ' Firework Star$' ) then v = 'Firework Star' | ||
elseif v:find( ' | elseif v:find( ' Stone Bricks$' ) then v = 'Stone Bricks' | ||
elseif v:find( ' | elseif v:find( ' Quartz Block$' ) then v = 'Block of Quartz' | ||
elseif v:find( ' | elseif v:find( ' Andesite$' ) then v = 'Andesite' | ||
elseif v:find( ' | elseif v:find( ' Diorite$' ) then v = 'Diorite' | ||
elseif v:find( ' | elseif v:find( ' Granite$' ) then v = 'Granite' | ||
elseif v:find( ' | |||
end | end | ||
table.insert( categories, '[[ | table.insert( categories, '[[Category:Recipe using ' .. v .. ']]' ) | ||
end | end | ||
end | end | ||