-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Luanti version
5.10.0 through 5.14.0, presumably before and after as well
Operating system and version
Devuan Stable
CPU model
AMD Ryzen 5
GPU model
AMD Radeon RX 480
Active renderer
No response
Summary
When left-clicking a node with dig_immediate=3 and holding an item with an on_use function, the on_use function normally takes precedence over digging. However, if the on_use function removees the item, digging will be immediately enabled and the node will be dug instantly, on the same click as the item use.
With a stack of such items, you can click the node to use them without digging the node, on every item but the last, at which point Luanti behaves differently.
Steps to reproduce
I noticed this while investigating a bug report on Exile. We have a protection item, iron nails, which in our stable release is applied to an item by tapping left click three times on the object you want to nail down. It's a quirky item but that quirk revealed this strange behavior.
Reproduction:
Open Exile's stable release from contentdb
Enable creative and take one clay lamp (unlit) and 2x stack of iron nails
Disable creative mode
Place the clay lamp
Click it three times with the 2x stack of nails
Now dig and re-place the lamp
Trash one stack of nails, leaving the other
Discover that the lamp can't possibly be nailed down with only one set of nails
Edit: You might want to use the unlit lantern, as there's a bug in the CDB release that causes clay oil lamps to not return the nails, but OTOH, that saves the need to trash one, so ¯_(ツ)_/¯