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

Нет описания правки
Метка: ручная отмена
Нет описания правки
Строка 1: Строка 1:
local p = {}
local p = {}
local JsonPaths = require('Module:JsonPaths')
local JsonPaths = require('Module:JsonPaths')
local prefix = JsonPaths.prefixFile()


local function normalizeSpritePath(path)
local function normalizeSpritePath(path)
Строка 200: Строка 199:


local function buildFileLink(id, project)
local function buildFileLink(id, project)
return "[[:Файл:" .. prefix .. id .. ".png]]"
return "[[:Файл:" .. JsonPaths.prefixFile(id) .. ".png]]"
end
end


Строка 275: Строка 274:
table.insert(result, mw.getCurrentFrame():preprocess(
table.insert(result, mw.getCurrentFrame():preprocess(
"{{Entity Sprite/Repeat|файлы=" .. table.concat(idLinks, " ") ..
"{{Entity Sprite/Repeat|файлы=" .. table.concat(idLinks, " ") ..
"|перенаправление=" .. prefix .. firstId ..
"|перенаправление=" .. JsonPaths.prefixFile(id) ..
"|id=" .. firstId ..
"|id=" .. firstId ..
"|спрайт=" .. spriteValue ..
"|спрайт=" .. spriteValue ..
Строка 296: Строка 295:


return mw.getCurrentFrame():preprocess(
return mw.getCurrentFrame():preprocess(
"{{Entity Sprite/Image|файл=" .. prefix .. id ..
"{{Entity Sprite/Image|файл=" .. JsonPaths.prefixFile(id) ..
"|id=" .. id ..
"|id=" .. id ..
"|путь=" .. buildSpriteUrl(baseUrl, spritePath) ..
"|путь=" .. buildSpriteUrl(baseUrl, spritePath) ..