Rename engine to cubi

This commit is contained in:
2026-11-03 17:17:37 -03:00
parent 68b78f053a
commit 98fa45ebd1
109 changed files with 643 additions and 788 deletions
+6 -6
View File
@@ -40,14 +40,14 @@ import { dirname } from "@std/path";
export { load_order, type LoadedMod, type ModReport };
// the engine's own textures, named engine:<file>
// the engine's own textures, named cubi:<file>
export const ENGINE_TEXTURE_DIR = "assets/sprites/textures";
// engine:missing is drawn by code, the rest are files
// cubi:missing is drawn by code, the rest are files
export function engine_texture_ids(): string[] {
return [
"engine:missing",
...walk(ENGINE_TEXTURE_DIR, ".png").map((file) => `engine:${file.replace(/\.png$/, "")}`),
"cubi:missing",
...walk(ENGINE_TEXTURE_DIR, ".png").map((file) => `cubi:${file.replace(/\.png$/, "")}`),
];
}
@@ -115,8 +115,8 @@ function load_mod(mods_dir: string, id: string): LoadedMod {
for (const problem of validate_manifest(manifest, id)) error(`manifest.json: ${problem}`);
mod.manifest = manifest as Record<string, unknown>;
}
if (id === "engine") {
error(`"engine" is reserved for the engine itself`);
if (id === "cubi") {
error(`"cubi" is reserved for the engine itself`);
}
const scripts = (mod.manifest?.scripts ?? {}) as Record<string, string>;