Add tiers for watering cans

This commit is contained in:
2026-09-30 00:11:04 -03:00
parent d8d1ee4698
commit 69900f7007
22 changed files with 219 additions and 37 deletions
+3 -3
View File
@@ -41,7 +41,7 @@ async function setup(items: string[] = []) {
}
Deno.test("hoe, fill the can, plant, water, and the crop grows the next morning", async () => {
const t = await setup(["bworld:wood_hoe", "bworld:watering_can", "bworld:wheat_seeds 4"]);
const t = await setup(["bworld:wood_hoe", "bworld:copper_watering_can", "bworld:wheat_seeds 4"]);
t.game.set_block(1, 100, 0, "bworld:grass");
t.game.set_block(0, 100, 1, "bworld:grass");
t.game.set_block(2, 100, 0, "bworld:water");
@@ -58,7 +58,7 @@ Deno.test("hoe, fill the can, plant, water, and the crop grows the next morning"
assertEquals(t.game.world.get_block_id(1, 101, 0), "bworld:wheat");
// a new can is empty, water fills it, and watering the crop waters the farmland under it
t.hold("bworld:watering_can");
t.hold("bworld:copper_watering_can");
t.take(1);
t.use(1, 101, 0);
assert(t.take(1).some((m) => m.type === "chat" && m.text.includes("empty")));
@@ -66,7 +66,7 @@ Deno.test("hoe, fill the can, plant, water, and the crop grows the next morning"
t.use(2, 100, 0);
t.use(1, 101, 0);
assertEquals(t.state(1, 100, 0, "watered"), 1);
const can = t.inventory_now().find((i) => i?.id === "bworld:watering_can");
const can = t.inventory_now().find((i) => i?.id === "bworld:copper_watering_can");
assertEquals(can?.data, { water: 31, max_water: 32 });
// nothing happens during the day