Модуль:Prototypes/Машина/Станок: различия между версиями

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


     local out = ""
     local recipesOutput = ""
     local foundAny = false
     local foundAny = false


Строка 311: Строка 311:
                 local recipeStr = formatRecipe(recipe, timeMultiplier, materialUseMultiplier)
                 local recipeStr = formatRecipe(recipe, timeMultiplier, materialUseMultiplier)
                 recipeStr = recipeStr:gsub("}}$", "|method-container=" .. lathe.id .. "}}")
                 recipeStr = recipeStr:gsub("}}$", "|method-container=" .. lathe.id .. "}}")
                 out = out .. '<div class="grid-item-adaptive">' .. recipeStr .. '</div>'
                 recipesOutput = recipesOutput .. recipeStr
             end
             end
         end
         end
Строка 320: Строка 320:
     end
     end


    local out = '<div class="grid-item-adaptive">' .. recipesOutput .. '</div>'
     return mw.getCurrentFrame():preprocess(out)
     return mw.getCurrentFrame():preprocess(out)
end
end
Строка 332: Строка 333:
     end
     end


     local out = ""
     local recipesOutput = ""
     local foundAny = false
     local foundAny = false


Строка 347: Строка 348:
                         local recipeStr = formatRecipe(recipe, timeMultiplier, materialUseMultiplier)
                         local recipeStr = formatRecipe(recipe, timeMultiplier, materialUseMultiplier)
                         recipeStr = recipeStr:gsub("}}$", "|method-container=" .. lathe.id .. "}}")
                         recipeStr = recipeStr:gsub("}}$", "|method-container=" .. lathe.id .. "}}")
                         out = out .. '<div class="grid-item-adaptive">' .. recipeStr .. '</div>'
                         recipesOutput = recipesOutput .. recipeStr
                         break
                         break
                     end
                     end
Строка 359: Строка 360:
     end
     end


    local out = '<div class="grid-item-adaptive">' .. recipesOutput .. '</div>'
     return mw.getCurrentFrame():preprocess(out)
     return mw.getCurrentFrame():preprocess(out)
end
end


return p
return p