Rename engine to cubi
This commit is contained in:
+6
-6
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user