跳转到内容

Module:NoteTA

来自Undertale Wiki

此模組用於抓取 /Data 檔案中的語言列表


local z = {}

function z.main()
    -- 讀取 Module:NoteTA/Data 內容
    local data = require('Module:NoteTA/Data')

    if data.content then
        local pieces = {}
        for _, v in ipairs(data.content) do
            if v.rule then
                table.insert(pieces, '-{H|' .. v.rule .. '}-')
            end
        end

        return tostring(mw.html.create('div')
            :attr('class', 'noteTA-group')
            :attr('data-noteta-group-source', 'module')
            :attr('data-noteta-group', data.name or 'Data')
            :wikitext(table.concat(pieces)))
    end

    return ''
end

return z