Модуль:Prototypes/Хранилище/Предмет: различия между версиями

Нет описания правки
Нет описания правки
Строка 30: Строка 30:
     for _, solution in pairs(solutions) do
     for _, solution in pairs(solutions) do
         for _, reagent in ipairs(solution.reagents) do
         for _, reagent in ipairs(solution.reagents) do
             result = result .. string.format('<li>[[Химия#chem_%s|%s] (%d ед.)</li>', reagent.ReagentId, reagent.ReagentId, reagent.Quantity)
             result = result .. string.format('<li>[[Химия#chem_%s|%s]] (%d ед.)</li>', reagent.ReagentId, reagent.ReagentId, reagent.Quantity)
         end
         end
     end
     end
     result = result .. '</ul>'
     result = result .. '</ul>'
     return result
     return mw.getCurrentFrame():preprocess(result)
end
end


Строка 49: Строка 49:
     if contents then
     if contents then
         for _, content in ipairs(contents) do
         for _, content in ipairs(contents) do
             if wrapped then
             result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}}}', content.id, content.id)
                result = result .. string.format('<div class="1 2">{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}} }}</div>', content.id, content.id)
            else
                result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}', content.id, content.id)
            end
         end
         end
     elseif tableContainer then
     elseif tableContainer then
Строка 64: Строка 60:
             if children then
             if children then
                 for _, child in ipairs(children) do
                 for _, child in ipairs(children) do
                     if wrapped then
                     result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}}}', child.id, child.id)
                        result = result .. string.format('<div class="1 2">{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}} }}</div>', child.id, child.id)
                    else
                        result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}', child.id, child.id)
                    end
                 end
                 end
             else
             else