Open Emojigit opened 4 months ago
Better way to handle this would probably be making machines compatible with mtg screwdriver and then disabling sonic screwdriver on server. I mean sonic screwdriver is mostly used because of the fact it does not have many checks.
But still probably best to wait for more comments, this is a bit complicated topic.
Being "broken" is the main point of difference of the sonic screwdriver, if it behaves almost the same as the default screwdriver, then it's just an expensive screwdriver.
I get that not all players/servers agree with the broken behavior of the sonic screwdriver and would like it fixed, but like other "feature-bugs" in technic, it's been around too long to simply get rid of it.
There's more discussion in #267 about it, but I think a setting like enable_feature_bugs
(defaulting to disabled) would be good to add, to let users decide if they want the old functionality or have the bugs fixed.
This PR ports the screwdriver code from Minetest Game. In their code, nodes can provide their handler to accept, reject, or do custom rotations. This change prevents weird rotations on nodes, e.g. battery box facing upwards.
For environments without a screwdriver mod, the old behavior is kept.
Note that some servers are using (abusing) the old behavior to trick man-made apple leaves to grow fruits. With this new change, it is no longer possible.
To do
This PR is ready for review.
How to test
on_rotate
handler.