Module:Edition: Difference between revisions

From Omega Wiki
Jump to navigation Jump to search
Import OmegaWiki seed content
 
Import Omega 0.90.4 scroll draft batch
 
Line 2: Line 2:
local ns = mw.title.getCurrentTitle().namespace
local ns = mw.title.getCurrentTitle().namespace
local isClassic = ns == 3002
local isClassic = ns == 3002
local metadata = { remake = { version = '0.80.2', commit = 'unknown', updated = '2026-07-23' }, classic = { version = '0.80.1', commit = 'unknown', updated = '2026-07-23' } }
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)
function p.name(frame)

Latest revision as of 13:47, 24 July 2026

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