Revert "feat: Add rabbit spawning button to HUD and implement rabbit tool"
This reverts commit 032793292fb25507110fa341de71b5c3bca57aa8.
This commit is contained in:
parent
349d38c04c
commit
7cabd79d5f
@ -20,7 +20,6 @@
|
|||||||
<button id="tree-seed-btn">Tree Seed</button>
|
<button id="tree-seed-btn">Tree Seed</button>
|
||||||
<button id="fire-btn">Fire</button>
|
<button id="fire-btn">Fire</button>
|
||||||
<button id="lava-btn">Lava</button>
|
<button id="lava-btn">Lava</button>
|
||||||
<button id="rabbit-btn">Rabbit</button>
|
|
||||||
<button id="eraser-btn">Eraser</button>
|
<button id="eraser-btn">Eraser</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
|
16
js/input.js
16
js/input.js
@ -28,8 +28,6 @@ function setTool(tool) {
|
|||||||
document.getElementById('fire-btn').classList.add('active');
|
document.getElementById('fire-btn').classList.add('active');
|
||||||
} else if (tool === LAVA) {
|
} else if (tool === LAVA) {
|
||||||
document.getElementById('lava-btn').classList.add('active');
|
document.getElementById('lava-btn').classList.add('active');
|
||||||
} else if (tool === RABBIT) {
|
|
||||||
document.getElementById('rabbit-btn').classList.add('active');
|
|
||||||
} else if (tool === EMPTY) {
|
} else if (tool === EMPTY) {
|
||||||
document.getElementById('eraser-btn').classList.add('active');
|
document.getElementById('eraser-btn').classList.add('active');
|
||||||
}
|
}
|
||||||
@ -116,20 +114,6 @@ function draw(x, y) {
|
|||||||
colorIndex: Math.floor(Math.random() * FIRE_COLORS.length)
|
colorIndex: Math.floor(Math.random() * FIRE_COLORS.length)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Special handling for rabbits - only spawn on empty spaces
|
|
||||||
else if (currentTool === RABBIT) {
|
|
||||||
if (getPixel(pixelX, pixelY) === EMPTY) {
|
|
||||||
setPixel(pixelX, pixelY, RABBIT);
|
|
||||||
// Initialize rabbit metadata
|
|
||||||
setMetadata(pixelX, pixelY, {
|
|
||||||
initialized: true,
|
|
||||||
jumpCooldown: 0,
|
|
||||||
direction: Math.random() > 0.5 ? 1 : -1, // 1 for right, -1 for left
|
|
||||||
jumpHeight: 0,
|
|
||||||
colorIndex: Math.floor(Math.random() * RABBIT_COLORS.length)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
setPixel(pixelX, pixelY, currentTool);
|
setPixel(pixelX, pixelY, currentTool);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user