Модуль:IanComradeBot/prototypes/fills/Item.json/data: различия между версиями

Нет описания правки
м Update via atematic bot
 
(не показаны 3 промежуточные версии этого же участника)
Строка 1: Строка 1:
local title = mw.title.new("Участник:IanComradeBot/prototypes/fills/Item.json")
local loader = require("Module:JsonLoader")
local jsonData = title and title:getContent() or ""
return loader.getFromTitle("Участник:IanComradeBot/prototypes/fills/Item.json")
local success, data = pcall(mw.text.jsonDecode, jsonData)
 
if success and type(data) == "table" then
    if data.id then
        return { data }
    else
        return data
    end
else
    return {}
end