Модуль:Entity Sprite/all: различия между версиями

Нет описания правки
Нет описания правки
Строка 34: Строка 34:
     return ""
     return ""
end
end
local MAX_CHECKS = 100
local checkCount = 0


local function fileExists(name)
local function fileExists(name)
    if checkCount >= MAX_CHECKS then
        return false
    end
    checkCount = checkCount + 1
     local title = mw.title.new(name, "File")
     local title = mw.title.new(name, "File")
     return title and title.exists
     return title and title.exists
Строка 118: Строка 109:


     return mw.getCurrentFrame():preprocess(
     return mw.getCurrentFrame():preprocess(
         "{{Песочница/Pok|файл=" .. prefix .. id ..
         "{{Entity Sprite/Image|файл=" .. prefix .. id ..
         "|id=" .. id ..
         "|id=" .. id ..
         "|путь=" .. baseUrl .. spritePath ..
         "|путь=" .. baseUrl .. spritePath ..