Minetest-WorldEditAdditions/README.md

90 lines
3.6 KiB
Markdown
Raw Normal View History

2018-05-20 13:19:21 +00:00
# Minetest-WorldEditAdditions
> Extra tools and commands to extend WorldEdit for Minetest
2018-06-09 19:11:46 +00:00
If you can dream of it, it probably belongs here!
## Current commands:
2018-06-09 19:06:39 +00:00
**Quick Reference:**
- `//floodfill [<replace_node> [<radius>]]`
- `//overlay <node_name>`
- `//ellipsoid <rx> <ry> <rz> <node_name>`
- `//hollowellipsoid <rx> <ry> <rz> <node_name>`
2018-06-10 12:49:09 +00:00
- `//torus <major_radius> <minor_radius> <node_name>`
- `//hollowtorus <major_radius> <minor_radius> <node_name>`
- `//multi <command_a> <command_b> .....`
### `//floodfill [<replace_node> [<radius>]]`
Floods all connected nodes of the same type starting at _pos1_ with <replace_node> (which defaults to `water_source`), in a sphere with a radius of <radius> (which defaults to 50).
```
//floodfill
//floodfill water_source 50
//floodfill glass 25
```
### `//overlay <node_name>`
Places <replace_node> in the last contiguous air space encountered above the first non-air node. In other words, overlays all top-most nodes in the specified area with <replace_node>.
Will also work in caves, as it scans columns of nodes from top to bottom, skipping every non-air node until it finds one - and only then will it start searching for a node to place the target node on top of.
Note that all-air columns are skipped - so if you experience issues with it not overlaying correctly, try `//expand down 1` to add an extra node's space to your defined region.
```
//overlay grass
//overlay glass
//overlay grass_with_dirt
```
2018-06-09 19:06:39 +00:00
### `//ellipsoid <rx> <ry> <rz> <node_name>`
Creates a solid ellipsoid at position 1 with the radius `(rx, ry, rz)`.
```
//ellipsoid 10 5 15 ice
//ellipsoid 3 5 10 dirt
//ellipsoid 20 10 40 air
```
### `//hollowellipsoid <rx> <ry> <rz> <node_name>`
Creates a hollow ellipsoid at position 1 with the radius `(rx, ry, rz)`. Works the same way as `//ellipsoid` does.
```
//hollowellipsoid 10 5 15 glass
//hollowellipsoid 21 11 41 stone
```
2018-06-09 19:11:46 +00:00
2018-06-10 12:49:09 +00:00
### `//torus <major_radius> <minor_radius> <node_name>`
2018-06-10 12:48:11 +00:00
Creates a solid torus at position 1 with the specified major and minor radii. The major radius is the distance from the centre of the torus to the centre of the circle bit, and the minor radius is the radius of the circle bit.
```
2018-06-10 12:49:09 +00:00
//torus 15 5 stone
//torus 5 3 meselamp
2018-06-10 12:48:11 +00:00
```
2018-06-10 12:49:09 +00:00
### `//hollowtorus <major_radius> <minor_radius> <node_name>`
2018-10-14 11:58:47 +00:00
Creates a hollow torus at position 1 with the radius major and minor radii. Works the same way as `//torus` does.
2018-06-10 12:48:11 +00:00
```
2018-10-14 11:58:47 +00:00
//hollowtorus 10 5 glass
//hollowtorus 21 11 stone
```
### `//multi <command_a> <command_b> <command_c> .....`
Executes multi chat commands in sequence. Intended for _WorldEdit_ commands, but does work with others too. Don't forget a space between commands!
```
//multi //1 //2 //shift z -10 //sphere 5 sand //shift z 20 //ellipsoid 5 3 5 ice
//multi //1 //hollowtorus 30 5 stone //hollowtorus 20 3 dirt //torus 10 2 dirt_with_grass
//multi /time 7:00 //1 outset h 20 //outset v 5 //overlay dirt_with_grass //1 //sphere 8 air //shift down 1 //floodfill //reset
2018-06-10 12:48:11 +00:00
```
2018-06-09 19:11:46 +00:00
## Contributing
Contributions are welcome! Please state in your pull request(s) that you release your contribution under the _Mozilla Public License 2.0_.
Please also make sure that the logic for every new command has it's own file. For example, the logic for `//floodfill` goes in `worldeditadditions/floodfill.lua`, the logic for `//overlay` goes in `worldeditadditions/overlay.lua`, etc.
## License
This mod is licensed under the _Mozilla Public License 2.0_, a copy of which (along with a helpful summary as to what you can and can't do with it) can be found in the `LICENSE` file in this repository.
If you'd like to do something that the license prohibits, please get in touch as it's possible we can negotiate something.