Add the oak_ on the oak blocks
This commit is contained in:
@@ -93,22 +93,22 @@ Deno.test("shift clicking into a furnace goes by its slot filters, and takes the
|
||||
});
|
||||
|
||||
Deno.test("shift clicking the crafting result crafts as many as fit", async () => {
|
||||
const t = await setup([["bworld:log", 3]]);
|
||||
const t = await setup([["bworld:oak_log", 3]]);
|
||||
// the logs into the grid, then the result shift clicked: 3 crafts of 2 planks
|
||||
t.send(1, { type: "click", menu: 0, slot: 0, button: 0 });
|
||||
t.send(1, { type: "click", menu: 0, slot: PLAYER_MENU_CRAFTING, button: 0 });
|
||||
t.send(1, { type: "click", menu: 0, slot: PLAYER_MENU_CRAFTING + CRAFTING_RESULT_SLOT, button: 0, shift: true });
|
||||
const messages = t.take(1);
|
||||
assertEquals(last_container(messages, "crafting").every((item: Msg) => item === null), true);
|
||||
assertEquals(last_container(messages, "inventory")[8], { id: "bworld:planks", count: 6 });
|
||||
assertEquals(last_container(messages, "inventory")[8], { id: "bworld:oak_planks", count: 6 });
|
||||
});
|
||||
|
||||
Deno.test("shift clicking the crafting grid puts its items back in the inventory", async () => {
|
||||
const t = await setup([["bworld:log", 3]]);
|
||||
const t = await setup([["bworld:oak_log", 3]]);
|
||||
t.send(1, { type: "click", menu: 0, slot: 0, button: 0 });
|
||||
t.send(1, { type: "click", menu: 0, slot: PLAYER_MENU_CRAFTING + 4, button: 0 });
|
||||
t.send(1, { type: "click", menu: 0, slot: PLAYER_MENU_CRAFTING + 4, button: 0, shift: true });
|
||||
const messages = t.take(1);
|
||||
assertEquals(last_container(messages, "crafting").every((item: Msg) => item === null), true);
|
||||
assertEquals(last_container(messages, "inventory")[9], { id: "bworld:log", count: 3 });
|
||||
assertEquals(last_container(messages, "inventory")[9], { id: "bworld:oak_log", count: 3 });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user