From 35883591d29eb8e4b2bade9f959717390c8bf129 Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Sat, 8 Feb 2025 15:30:35 +0100 Subject: [PATCH] Hardcode the chisel break time to 0.5 seconds, to make it easier in survival. --- src/renderer.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/renderer.zig b/src/renderer.zig index 4c967100..570aed5e 100644 --- a/src/renderer.zig +++ b/src/renderer.zig @@ -854,11 +854,18 @@ pub const MeshSelection = struct { // MARK: MeshSelection if(isTool) { power = stack.item.?.tool.getPowerByBlockClass(block.blockClass()); } + const isChisel = stack.item != null and stack.item.? == .baseItem and std.mem.eql(u8, stack.item.?.baseItem.id, "cubyz:chisel"); + if(isChisel and block.mode() == main.rotation.getByID("stairs")) { // TODO: Remove once the chisel is a tool. + power = 10; + } if(power >= block.breakingPower()) { var breakTime: f32 = block.blockHealth(); if(isTool) { breakTime = breakTime*stack.item.?.tool.swingTime/power; } + if(isChisel and block.mode() == main.rotation.getByID("stairs")) { // TODO: Remove once the chisel is a tool. + breakTime = 0.5; + } currentBlockProgress += @as(f32, @floatCast(deltaTime))/breakTime; if(currentBlockProgress < 1) { mesh_storage.removeBreakingAnimation(lastSelectedBlockPos);