Модуль:Песочница/Pok: различия между версиями

мНет описания правки
мНет описания правки
Строка 301: Строка 301:
     end
     end


     local out = '{| class="wikitable"' .. "\n! Станок ID\n! Рецепт\n"
     local out = '{| class="wikitable"' .. "\n! Станок\n! Рецепт\n"
     local foundAny = false
     local foundAny = false


Строка 313: Строка 313:
                 foundAny = true
                 foundAny = true
                 out = out .. '|-' .. "\n"
                 out = out .. '|-' .. "\n"
                out = out .. '| ' .. formatRecipe(recipe, timeMultiplier, materialUseMultiplier, true) .. "\n"
                 out = out .. '| [[File:' .. lathe.id .. '.png|32x32px|link=]] [[{{#invoke:Entity Lookup|getname|' .. lathe.id .. '}}|{{#invoke:Entity Lookup|getname|' .. lathe.id .. '}}]]' .. "\n"
                 out = out .. '| [[File:' .. lathe.id .. '.png|32x32px|link=]] [[{{#invoke:Entity Lookup|getname|' .. lathe.id .. '}}|{{#invoke:Entity Lookup|getname|' .. lathe.id .. '}}]]' .. "\n"
                out = out .. '| ' .. formatRecipe(recipe, timeMultiplier, materialUseMultiplier, true) .. "\n"
             end
             end
         end
         end
Строка 361: Строка 361:
             for i, recipe in ipairs(matchingRecipes) do
             for i, recipe in ipairs(matchingRecipes) do
                 out = out .. '|-\n'
                 out = out .. '|-\n'
                out = out .. '| ' .. formatRecipe(recipe, timeMultiplier, materialUseMultiplier, false) .. "\n"
                 if i == 1 then
                 if i == 1 then
                     out = out .. string.format('| rowspan="%d"|[[File:%s.png|32x32px|link=]] [[{{#invoke:Entity Lookup|getname|%s}}|{{#invoke:Entity Lookup|getname|%s}}]]\n', rowspan, lathe.id, lathe.id, lathe.id)
                     out = out .. string.format('| rowspan="%d"|[[File:%s.png|32x32px|link=]] [[{{#invoke:Entity Lookup|getname|%s}}|{{#invoke:Entity Lookup|getname|%s}}]]\n', rowspan, lathe.id, lathe.id, lathe.id)
                 end
                 end
                out = out .. '| ' .. formatRecipe(recipe, timeMultiplier, materialUseMultiplier, false) .. "\n"
             end
             end
         end
         end