mesecons
mesecons copied to clipboard
Falling nodes don't fall if ghoststone below get activated
If you place a falling node on a ghoststone or removestone, then activate either of them, the falling node floats in mid-air and doesn't fall. Also, attached nodes at removestones or ghoststones stay attached when the main node is gone.
Hint: In Minetest, you can use the undocumented function nodeupdate to “remind” nodes that they should fall. However, this function will be removed at least in Minetest 0.4.16. The current dev version of Minetest has the properly documented functions minetest.check_for_falling and minetest.check_single_for_falling. I suggest to test your code with falling nodes and attached nodes at the ghoststone or removestone.
I agree that the removestone should cause nodes to fall when being removed. The ghoststone, however, shouldn't. That is because it is still technically there, it is just invisible. Also, placing e.g. sand on top of a ghoststone would cause weird behaviour.
Edit: Not sure if this is currently technicall possible (propably it isn't), but this would basically mean my solution to #289 is that the sand should not fall into the ghoststone, but remain on top. If it's technically impossible, I agree with your suggestion in #289.
Well, it is wildly inconsistent then. You can walk through ghoststone, but sand on ghoststone doesn't fall down? And when you drop a sand through ghoststone, it goes through again. So apparently ghoststone lets sand through, but only under certain conditions. Very confusing.
I would rather let the sand through under all conditions, and just let it fall when the ghoststone gets activated. The other approach, that is, keeping it on top, may probably not easily solvable without hacking the falling node code (you would also need to stop falling nodes falling on top of an active ghoststone).
I've the same problem with pistons. If a piston pushes a sand node over an edge, the sand node didn't fall. It's only working when the sand node is placed above the piston and the piston retracts.
@alxki Works for me. Make sure you have the latest version (including #392)
Note: removestone part is fixed in #357
Water also doesn't flow through ghoststones btw. Maybe make the ghoststone visible when there's a force from another node to it?
Hmm, maybe. Two (show+hide) ABMs may be used for that.