ctx.schematics.ids
This commit is contained in:
@@ -288,6 +288,12 @@ Deno.test("get gives a copy of a registered schematic with its id, a file's or a
|
||||
assertEquals(t.game.world.get_block_id(10, 100, 20), "bworld:oak_planks");
|
||||
});
|
||||
|
||||
Deno.test("ids gives every registered schematic's id, the files' first, without the ones that failed", async () => {
|
||||
const t = await place_setup();
|
||||
const ids = t.schematics.ids().filter((id) => id.startsWith("testmod:"));
|
||||
assertEquals(ids, ["testmod:post", "testmod:hut", "testmod:partial"]);
|
||||
});
|
||||
|
||||
Deno.test("a mod's schematics/<name>.cbsm files are registered as <mod id>:<name> before its scripts run", async () => {
|
||||
const t = await place_setup();
|
||||
assertStringIncludes(String(t.game.mods.storage.testmod?.post), "registered twice");
|
||||
|
||||
Reference in New Issue
Block a user