https://github.com/bas080/habitat
adds function for modders to use for spawning for example plants and trees near certain nodes
https://github.com/bas080/habitat
Last synced: 8 months ago
JSON representation
adds function for modders to use for spawning for example plants and trees near certain nodes
- Host: GitHub
- URL: https://github.com/bas080/habitat
- Owner: bas080
- Created: 2012-08-27T23:59:12.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-02-27T21:04:03.000Z (about 13 years ago)
- Last Synced: 2025-02-01T20:12:21.398Z (about 1 year ago)
- Language: Lua
- Homepage: http://forum.minetest.net/viewtopic.php?id=4612
- Size: 133 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.txt
Awesome Lists containing this project
README
__ __ _______ _______ ___ _______ _______ _______
| | | || _ || _ || | | || _ || |
| |_| || |_| || |_| || | |_ _|| |_| ||_ _|
| || || || | | | | | | |
| || || _ | | | | | | | | |
| _ || _ || |_| || | | | | _ | | |
|__| |__||__| |__||_______||___| |___| |__| |__| |___|
BY: bas080
DESCRIPTION: Adds the function to spawn nodes near certain nodes and away from others on world generate
VERSION: 0.5
LICENCE: WTFPL
FORUM: http://forum.minetest.net/viewtopic.php?id=4612
Instructions
habitat:generate(node, surfaces, minp, maxp, height_min, height_max, spread, habitat_size, habitat_nodes, antitat_size, antitat_nodes)
* height is the altitude between the node spawns
* spawn near habitat nodes
* avoids antitat nodes
* spread determines how near they spawn next to eachother
Example (from plants mod)
habitat:generate("plants:lavender_wild", {"default:dirt_with_grass"}, minp, maxp, -10, 60, 4, 4, {"default:sand",})
TODO
1.1
* Make node string argument nodes array that spawns random nodes in array
Changelog
1.0
* Reduce amount of loops even more by changing surfaces array to surface string
0.5
* changed function definition (name)
* Improved for loop. Less looping and node checking
0.1
* Spawn plants on generate