Bearbeiten von „Modul:RecipeTable“
Aus Eco - Deutsches Wiki
Deine Änderungen werden angezeigt, sobald ein dazu berechtigter Benutzer sie akzeptiert hat. (Hilfe)
Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.
Aktuelle Version | Dein Text | ||
Zeile 34: | Zeile 34: | ||
elseif style == 'skill' then | elseif style == 'skill' then | ||
iconBG = 'iconBrightBlue' | iconBG = 'iconBrightBlue' | ||
name = nameEN | |||
end | end | ||
Zeile 41: | Zeile 41: | ||
end | end | ||
return Utils.build_icon(icon | return Utils.build_icon(icon, 'iconRecipe', iconBG, borderImageClass, true) .. '\n[[' .. name .. ']]' | ||
end | end | ||
Zeile 103: | Zeile 103: | ||
--use last variant as this is always the default variant | --use last variant as this is always the default variant | ||
local numberOfVariants = recipes[i].numberOfVariants | local numberOfVariants = recipes[i].numberOfVariants | ||
local products = {} | local products = { { '', '', '' } } | ||
local ingredients = {} | local ingredients = { { '', '' } } | ||
--loop through variants to select default variant ingredients | --loop through variants to select default variant ingredients | ||
for k, v in pairs(recipes[i].variants) do | |||
--given pairs doesn't guarantee order, check that product matches default variant | |||
if k == recipes[i].defaultVariant then | |||
ingredients = v.ingredients | |||
products = v.products | |||
end | end | ||
end | end |