Closed coil0 closed 3 years ago
You can use buildable_to: https://github.com/HybridDog/replacer/blob/8da542568cb8fcfd5a5a1201fbbc6872c6c7ecc6/init.lua#L461
Thank you for the tip. That works much better.
Updated to use buildable_to from the node def instead.
Some nodes - in particular flowers - use buildable_to. But as a builder in survival mode, you often need the flowers - either to place them elsewhere or to craft dyes. So buildable_to for them is an annoyance. They need to be digged first. However, the buildable_to solution and a general solution for nodes of that type seems fine. I've modified this a bit and will add a (for me) acceptable solution soon. Thanks for the PR and the discussion!
This makes it possible to build with a right-click using the replacer on the vacuum node from BuckarooBanzay's vacuum mod.
Without this, the replacer fails to dig the node and you get the message
"Replacing 'vacuum:vacuum' with 'default:gravel 0 0' failed. Unable to remove old node."
(for example).If you don't like hard-coding non-default node names, we can add an API for other mods to register air-like nodes instead.