With commit 24e2e7b7, NodeCore has changed its rotation API.
It now automatically fixes "non-canonical" facedir values on
node update, and `spindata` is no longer.
- Remove nodecore_filtered_lookup
NodeCore now exposes this information,
and turns out there was a bug in it, anyway.
- Move fix_rotatable_facedir to utility.lua
- Add sanity check to ensure spindata exists
- Depends on NodeCore `966ed012`
- Handle on_rightclick overriding in registry.lua
This simplifies registry of rotatable nodes.
- Move empty-hand right-click to registry.lua
- Move nodecore_filtered_lookup to utility.lua
- Add registry.is_rightclick_filtered and ..
- .. use it in calculate_rotating_state so when it
returns true, the rotation hint won't be shown.
- Use global to hold sub-modules
- Move state calculation to state.lua
- Do manual overriding of on_rightclick functions
- Call default right-click impl when holding pin on door
- Replace on_rightclick of registered node
- Replace on_place of empty hand item to
handle sneak-rightclicking to invert rotation
- Move registry related things to registry.lua
- Fix off-by-one error in nodecore_filtered_lookup
- Detect corner interactions, not just edges
- Corner interactions rotate by 120°
- Add rotate_node function to mimic NodeCore spin
- Add register_rotatable
Registers a node that can be rotated.
- Add fix_rotatable_facedir
Looks up equivalent facedir value from
loopup array specified when registering.
- Replace rotate_node with rotate_facedir
Rotates a facedir value instead of a node in-world.
- Add calculate_rotating_state
To separate state-creation into its own function,
and to fix an issue where HUD wouldn't update.
- Add nodecore_filtered_lookup
Mimics NodeCore's rotation filtering to create
a lookup table based on a passed-in function.
- Register lenses, prisms and panels