This requires a cache-invalidation hack borrowed from cloudlands mod.
Also, null reference fixes in ensure_remote_portal_then_teleport and locate_or_build_portal, and minor improvements
32affba6 re-registered stairs which have already been registered 20 lines earlier in the code, and registered them as "brick" causing the netherbrick stairs to replace Minetest's default:brick stairs. The rest of 32affba6 was already unrolled in 7a0e52da, but the stairs bug remained.
Fix bug where ensure_remote_portal_then_teleport() converted its destination_wormholePos to an anchorPos to pass to locate_or_build_portal() which converted it back to an wormholePos. Bug occurred when local_orientation was assumed for the target orientation, which could lead to locate_or_build_portal() ending up with a reconstituted wormholePos rotated outside the portal frame, not find a portal frame, so build a new portal there, griefing the old one.
locate_or_build_portal() has been refactored to take a wormholePos instead of an anchorPos, removing the need to know the orientation of the target portal (which can't be obtained from the param2 when the target portal is unlit)
This is effectively a missing part to the change that made locate_or_build_portal() enforce that portals only link together in mutual pairs. As target portals that didn't need to be located or built we not being updated to link back to where the player travelled from.
Also
* implements events: on_run_wormhole, on_extinguish
* adds a lot of debug info
Currently proof of concept: Removes wormhole colour from .png texture and specifies it through MT API instead. The post_effect_color may call for registering a separate node per portal colour.
Palette 0 will have to be the traditional portal magenta (instead of 0 being black) for map compatibility with mod when colour was in the texture and not param2.
While it's rather cute having portals that share parts of their frame with other portals, the way the nether mod implemented portals means a node being part of more than one portal enables a family of bugs.
Igniting a portal now extinguishes any portal that was using nodes now taken by the newly ignited portal.
Allows dev and testing/debugging to focus on one (shape or behavior) without getting mixed up in the other, will also enable different portal shapes later on. Other adjustments:
* Reuse/reignite an existing portal or portal frame if there is one at the remote destination, rather than the area being overwritten by a slightly offset portal schematic.
* Create remote portals in a matching orientation to the local portal.
* Preserve player position & facing relative to portal when traveling through wormhole (even if portals are at 90°)
* Players no longer bounce several times after teleporting
* Player is not teleported until after the portal at the other end is confirmed/built
32affba6 re-registered stairs which have already been registered 20 lines earlier in the code, and registered them as "brick" causing the netherbrick stairs to replace Minetest's default:brick stairs. The rest of 32affba6 was already unrolled in 7a0e52da, but the stairs bug remained.
Reuse a single table for content ids to reduce memory use.
Add DEBUG parameter to control printing of mapchunk generation time,
set to false as default.
Add missing noise parameters (parameters are default and unchanged).
Goal: make caves a lot brighter, accentuating glowstone and lava
accents, making walking around without torches possible. The old
light level was barely enough to walk and see edges. This level
feels adequate.
Gimp settings: brightness + 40, contrast + 20.
Large caverns using squashed 3D noise
Less lava, more glowstone, no air pockets
Preserve nether dungeons
Allow light to spread from glowstone and make brighter
Fix 'is ground content' settings, portals should not be
excavated by overgenerated caves
Rack drops itself as normal
Make brick, fence, stair, slab groups consistent
Use 'node sound gravel defaults' for sand
Make brick crafting consistent with default
Make fence recipe output number consistent with default
Make 'emerge area' volume mimimum required size
Add 'find nether target y' function to search for a cavern
floor with space above for nether portal spawn