Модуль:Entity Sprite: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 122: | Строка 122: | ||
end | end | ||
elseif param == "path" then | elseif param == "path" then | ||
if secondaryParam then | |||
for _, e in pairs(data) do | |||
if getSpritePath(e) == secondaryParam then | |||
return e.id | |||
end | |||
end | |||
return nil | |||
end | |||
return mw.getCurrentFrame():preprocess("{{Entity Sprite/Path|" .. entry.id .. "|" .. spritePath .. "}}") | return mw.getCurrentFrame():preprocess("{{Entity Sprite/Path|" .. entry.id .. "|" .. spritePath .. "}}") | ||
end | end | ||