Licence LGPLv2 or any later
For Minetest 5
- poschangelib to enable update by stepping on nodes
- twmlib for random update from time to time
Code: Select all
git clone https://files.creativekara.fr/git/naturalslopeslib.git
The lib itself doesn't include any change, you may also need a mod for a game that uses naturalslopeslib, check the download files for mods named naturalslopes_<game name>
This mod adds some stair-like nodes from soft ground nodes (sand, dirt, gravel...) that may change shape automatically according to their surroundings.
The aim of this mod is to make a visual improvement on the world with more curves and smooth movement not to jump on every little height. The library adds an API to register all the alternative 4 shapes and the change shape behavior with one line of code, while keeping some flexibility for the new nodes.
Registering a natural slope has the following effects:
- Four new nodes are registered based upon the original node definition: the straight slope, the inner corner, the outer corner and the "pike" (slab-like)
- When the map is generated, the blocks are changed to slopes according to the surrounding and the material hardness (defined when registering the slope)
- When blocks are placed around slopes, they may update their shape to match the new state
- Nodes that are just placed may also update their shape to match the surroundings
- If enabled, walking on edges may update the slope shape
- If enabled, some node may update from time to time