mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-22 10:53:55 -04:00
Always break the tool if it doesn't have enough durability anymore.
hot fix the all annoying tool not fully breaking problem. While durability per swing will go away soon, this is just future proofing the implementation if we get some durability per block system (see https://github.com/PixelGuys/Cubyz/issues/1661#issuecomment-3152116782)
This commit is contained in:
parent
d183c0dc25
commit
c6bb2108cf
@ -1718,7 +1718,7 @@ pub const Command = struct { // MARK: Command
|
||||
if(!switch(costOfChange) {
|
||||
.no => false,
|
||||
.yes => true,
|
||||
.yes_costsDurability => |durability| stack.item != null and stack.item.? == .tool and stack.item.?.tool.durability >= durability,
|
||||
.yes_costsDurability => |_| stack.item != null and stack.item.? == .tool,
|
||||
.yes_costsItems => |amount| stack.amount >= amount,
|
||||
.yes_dropsItems => true,
|
||||
}) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user