Модуль:Meals Lookup: различия между версиями
Mhamster (обсуждение | вклад) getimage, images |
Mhamster (обсуждение | вклад) smaller text |
||
| Строка 45: | Строка 45: | ||
function buildsolids(frame, array) -- should not be invoked | function buildsolids(frame, array) -- should not be invoked | ||
local out = "" | local out = "" | ||
local solidText = "" | |||
for solid, amount in pairs(array) do | for solid, amount in pairs(array) do | ||
solidText = frame:preprocess( "{{#invoke:Entity Lookup|getname|" ..solid .. "}}" ) | |||
if #solid > 24 then | |||
solidText = [[<div style = "font-size: 80%">]] .. solidText .. "</div>" | |||
end | |||
out = out .. | out = out .. | ||
frame:preprocess("{{Recipe Component|item= | frame:preprocess("{{Recipe Component|item=".. solidText .. | ||
"|image=" .. getimage(frame, solid) .. "|amount=" .. amount .. "}}") | |||
end | end | ||
return out | return out | ||