clone

a browser grid puzzle game where you push words around to rewrite the rules of each level

Bundle approved Crossword Crate Works and Tidewater worlds

Dami committed 2c984a7
commit
2c984a7b38b09c761d743aa4b7470ae36049681d
parent
115c9537249b244f1c3d021e21d213b5113029ab
author
Dami <dami.etoile@gmail.com>
1 file changed, +2 -3
Msrc/main.js5++---
M src/main.js +2 -3
@@ -1,8 +1,7 @@
11 import { createGame } from './engine.js';22 import { loadMod } from './mods.js';33 import { createCatalog } from './catalog.js';4-import gardenBasicsSource from '../mods/garden-basics.cjs?raw';5-import wordLabSource from '../mods/word-lab.cjs?raw';4+import { BUNDLED_WORLD_SOURCES } from './bundled-worlds.js';65 import { prepare, layout } from '@chenglou/pretext';76 import { createStage } from './stage.js';87 import { SCENE_MOTION_TIMING } from './stage/scene-motion.js';
@@ -110,7 +109,7 @@ function refreshIndex(focusId) {
110109 function activePalette() { return currentLevels()[levelNo]?.palette || {}; }111110 function activePackId() { return currentLevels()[levelNo]?.packId || 'core'; }112111 function showModStatus(message, detail = '') { modStatus.textContent = message; modStatus.title = detail || message; }113-function registerBundledPacks() { for (const [filename, source] of [['garden-basics.cjs', gardenBasicsSource], ['word-lab.cjs', wordLabSource]]) { try { loadAndRegister(source, filename); } catch (error) { showModStatus(`Could not load ${filename}`, error.message); } } }112+function registerBundledPacks() { for (const { filename, source } of BUNDLED_WORLD_SOURCES) { try { loadAndRegister(source, filename); } catch (error) { showModStatus(`Could not load ${filename}`, error.message); } } }114113 function loadAndRegister(source, filename) { const mod = loadMod(source, { filename }); return catalog.register(mod, { origin: 'bundled' }); }115114 function loadLevel(index) {116115 const list = currentLevels();