Change the asset keys

This commit is contained in:
2026-11-04 21:54:01 -03:00
parent ba4b2a8798
commit 4683b09e10
20 changed files with 39 additions and 39 deletions
+2 -2
View File
@@ -49,9 +49,9 @@ Deno.test("what the player wears is drawn on them too, with the atlas, in among
await test_game("mods");
const skin = { width: 64, height: 64, tex: "skin" } as unknown as Texture;
const atlas = { width: 256, height: 256, tex: "atlas" } as unknown as Texture;
AssetManager.instance.assets["bworld:textures"] = atlas as never;
AssetManager.instance.assets["cubi:textures"] = atlas as never;
// where each texture is in the atlas, none known: the renderer falls back to a spot of its own
AssetManager.instance.assets["bworld:textures_info"] = {} as never;
AssetManager.instance.assets["cubi:textures_info"] = {} as never;
const plain = gui_player_faces(skin, false, 0, 0);
const gloved = gui_player_faces(skin, false, 0, 0, [new ItemStack("artifacts:power_glove", 1)]);
assert(plain.every((face) => face.texture === skin));
+1 -1
View File
@@ -281,7 +281,7 @@ Deno.test("a broken bworld:fermentable recipe stops the server from starting", a
// server's rules, the same as a client's
async function drawn_juicer() {
const { game } = await setup();
AssetManager.instance.assets["bworld:textures_info"] = {};
AssetManager.instance.assets["cubi:textures_info"] = {};
const client_rules = fluid_rules;
set_fluid_rules(game.mods.fluid_rules);
// bworld's client script, with only what it needs for its visuals
+3 -3
View File
@@ -74,7 +74,7 @@ async function registries() {
write_testmod(dir);
await test_game(dir);
Deno.removeSync(dir, { recursive: true });
AssetManager.instance.assets["bworld:textures_info"] = {};
AssetManager.instance.assets["cubi:textures_info"] = {};
const nid = (id: string) => EverythingRegistry.get_id("blocks", id)!;
const value = (id: string, state = 0) => block_value(nid(id), state);
return { nid, value };
@@ -336,7 +336,7 @@ Deno.test("an item is drawn the size it is on the ground, with one model for eve
Deno.test("a fluid's box is its texture cut to fit and tinted in its color, a model of its own that goes with it", async () => {
const { nid, value } = await registries();
AssetManager.instance.assets["bworld:textures_info"] = {
AssetManager.instance.assets["cubi:textures_info"] = {
"testmod:syrup_still": { x: 32, y: 0, width: 16, height: 16 },
};
let box: FluidInstance | undefined;
@@ -434,7 +434,7 @@ Deno.test({
shade: true,
};
// the atlas is just its texture
AssetManager.instance.assets["bworld:textures_info"] = {
AssetManager.instance.assets["cubi:textures_info"] = {
"testmod:shaft": { x: 0, y: 0, width: 16, height: 16 },
};
const quads = instance_quads([quad], () => [1, 1, 1]);