-- ============================================================================ -- M-Minigames :: registry -- -- Adding a game means three things and nothing else: -- 1. an entry in GAME_ORDER below -- 2. a tuning block in Config.Games (config.lua) -- 3. web/games/.js + .css, referenced from web/index.html -- ============================================================================ Registry = {} local GAME_ORDER = { 'oreStrike', 'drillStability', 'jackRhythm', 'fracturePoints', 'heatControl', 'keypad', 'sequenceMemory', 'circuitTrace', 'holdRelease', 'sortingBins' } function Registry.Exists(name) return type(name) == 'string' and Config.Games[name] ~= nil end function Registry.Order() return GAME_ORDER end function Registry.Count() return #GAME_ORDER end ---Metadata for tooling — the shape returned by the GetGames() export. function Registry.List() local out = {} for _, name in ipairs(GAME_ORDER) do local game = Config.Games[name] if game then out[#out + 1] = { name = name, label = L('game_' .. name), hint = L('hint_' .. name), input = game.input or 'keyboard' } end end return out end