Module:Edition

From Omega Wiki
Revision as of 13:47, 24 July 2026 by OmegaWiki scroll importer (talk | contribs) (Import Omega 0.90.4 scroll draft batch)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Edition/doc

local p = {}
local ns = mw.title.getCurrentTitle().namespace
local isClassic = ns == 3002
local metadata = { remake = { version = '0.90.4', commit = '009707d17482', updated = '2026-07-24' }, classic = { version = '0.80.1', commit = 'untracked', updated = '2026-07-23' } }

function p.name(frame)
    return isClassic and 'classic' or 'remake'
end

function p.other(frame)
    return isClassic and '' or 'Classic:'
end

function p.version(frame)
    local edition = isClassic and 'classic' or 'remake'
    return metadata[edition].version
end

function p.commit(frame)
    return metadata[isClassic and 'classic' or 'remake'].commit
end

function p.updated(frame)
    return metadata[isClassic and 'classic' or 'remake'].updated
end

return p