From 5ac6d205ad6f655c4a72bbcc0e038cc991b378dd Mon Sep 17 00:00:00 2001 From: "Kacper Kostka (aider)" Date: Sat, 5 Apr 2025 17:23:35 +0200 Subject: [PATCH] feat: Add rabbit spawning logic to input handling --- js/input.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/input.js b/js/input.js index 66ee9d0..3acb80f 100644 --- a/js/input.js +++ b/js/input.js @@ -128,6 +128,11 @@ function draw(x, y) { colorIndex: Math.floor(Math.random() * FIRE_COLORS.length) }); } + } + // Special handling for rabbits - create rabbit entity + else if (currentTool === RABBIT) { + createEntity(ENTITY_TYPES.RABBIT, pixelX, pixelY); + return; // Only create one rabbit per click } else { setPixel(pixelX, pixelY, currentTool);