Модуль:Entity Sprite/all: различия между версиями
Pok (обсуждение | вклад) Нет описания правки Метка: ручная отмена |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 1: | Строка 1: | ||
local p = {} | local p = {} | ||
local JsonPaths = require('Module:JsonPaths') | local JsonPaths = require('Module:JsonPaths') | ||
local function normalizeSpritePath(path) | local function normalizeSpritePath(path) | ||
| Строка 200: | Строка 199: | ||
local function buildFileLink(id, project) | local function buildFileLink(id, project) | ||
return "[[:Файл:" .. | 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, " ") .. | ||
"|перенаправление=" .. | "|перенаправление=" .. JsonPaths.prefixFile(id) .. | ||
"|id=" .. firstId .. | "|id=" .. firstId .. | ||
"|спрайт=" .. spriteValue .. | "|спрайт=" .. spriteValue .. | ||
| Строка 296: | Строка 295: | ||
return mw.getCurrentFrame():preprocess( | return mw.getCurrentFrame():preprocess( | ||
"{{Entity Sprite/Image|файл=" .. | "{{Entity Sprite/Image|файл=" .. JsonPaths.prefixFile(id) .. | ||
"|id=" .. id .. | "|id=" .. id .. | ||
"|путь=" .. buildSpriteUrl(baseUrl, spritePath) .. | "|путь=" .. buildSpriteUrl(baseUrl, spritePath) .. | ||