mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 00:53:00 +00:00
//copy+: write docs
This commit is contained in:
parent
d560583121
commit
acb1ef1a0a
4 changed files with 41 additions and 7 deletions
|
@ -14,6 +14,7 @@ Note to self: See the bottom of this file for the release template text.
|
||||||
- Add `//noiseapply2d` for running commands on columns where a noise value is over a threshold
|
- Add `//noiseapply2d` for running commands on columns where a noise value is over a threshold
|
||||||
- Add `//ellipsoid2` which creates an ellipsoid that fills the defined region
|
- Add `//ellipsoid2` which creates an ellipsoid that fills the defined region
|
||||||
- Add `//spiral2` for creating both square and circular spirals
|
- Add `//spiral2` for creating both square and circular spirals
|
||||||
|
- Add `//copy+` for copying a defined region across multiple axes at once
|
||||||
- Use [luacheck](https://github.com/mpeterv/luacheck) to find and fix a large number of bugs and other issues [code quality from now on will be significantly improved]
|
- Use [luacheck](https://github.com/mpeterv/luacheck) to find and fix a large number of bugs and other issues [code quality from now on will be significantly improved]
|
||||||
- Multiple commands: Allow using quotes (`"thing"`, `'thing'`) to quote values when splitting
|
- Multiple commands: Allow using quotes (`"thing"`, `'thing'`) to quote values when splitting
|
||||||
- `//layers`: Add optional slope constraint (inspired by [WorldPainter](https://worldpainter.net/))
|
- `//layers`: Add optional slope constraint (inspired by [WorldPainter](https://worldpainter.net/))
|
||||||
|
|
|
@ -193,7 +193,7 @@ Floods all connected nodes of the same type starting at _pos1_ with `<replace_no
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## `//wbox <replace_node>`
|
### `//wbox <replace_node>`
|
||||||
Sets the edges of the current selection to `<replace_node>`to create an outline of a rectangular prism. Useful for roughing in walls.
|
Sets the edges of the current selection to `<replace_node>`to create an outline of a rectangular prism. Useful for roughing in walls.
|
||||||
|
|
||||||
```weacmd
|
```weacmd
|
||||||
|
@ -201,7 +201,7 @@ Sets the edges of the current selection to `<replace_node>`to create an outline
|
||||||
//wbox dirt
|
//wbox dirt
|
||||||
```
|
```
|
||||||
|
|
||||||
## `//wcompass <replace_node> [<bead_node>]`
|
### `//wcompass <replace_node> [<bead_node>]`
|
||||||
Creates a compass around pos1 with a single node bead pointing north (+Z).
|
Creates a compass around pos1 with a single node bead pointing north (+Z).
|
||||||
|
|
||||||
```weacmd
|
```weacmd
|
||||||
|
@ -210,7 +210,7 @@ Creates a compass around pos1 with a single node bead pointing north (+Z).
|
||||||
//wcompass gold diamond
|
//wcompass gold diamond
|
||||||
```
|
```
|
||||||
|
|
||||||
## `//wcorner <replace_node>`
|
### `//wcorner <replace_node>`
|
||||||
Set the corners of the current selection to `<replace_node>`. Useful for outlining building sites and setting boundaries.
|
Set the corners of the current selection to `<replace_node>`. Useful for outlining building sites and setting boundaries.
|
||||||
|
|
||||||
```weacmd
|
```weacmd
|
||||||
|
@ -218,7 +218,7 @@ Set the corners of the current selection to `<replace_node>`. Useful for outlini
|
||||||
//wcorner stone_with_iron
|
//wcorner stone_with_iron
|
||||||
```
|
```
|
||||||
|
|
||||||
## `//scale <axis> <scale_factor> | <factor_x> [<factor_y> <factor_z> [<anchor_x> <anchor_y> <anchor_z>`
|
### `//scale <axis> <scale_factor> | <factor_x> [<factor_y> <factor_z> [<anchor_x> <anchor_y> <anchor_z>`
|
||||||
Advanced version of [`//stretch` from WorldEdit](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#stretch-stretchx-stretchy-stretchz) that can scale both up and down at the same time by transparently splitting it into 2 different operations. Scaling up is *always* done before scaling down.
|
Advanced version of [`//stretch` from WorldEdit](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#stretch-stretchx-stretchy-stretchz) that can scale both up and down at the same time by transparently splitting it into 2 different operations. Scaling up is *always* done before scaling down.
|
||||||
|
|
||||||
Although the syntax looks complicated, it's really quite simple. The key concept to understand is that of the scale factor. It refers to how much the defined region should be scaled up or down by, and can be specified in multiple different ways:
|
Although the syntax looks complicated, it's really quite simple. The key concept to understand is that of the scale factor. It refers to how much the defined region should be scaled up or down by, and can be specified in multiple different ways:
|
||||||
|
@ -300,6 +300,40 @@ By adding 3 extra numbers for the x, y, and z axes respectively, we can control
|
||||||
So in the above example, we scale in the positive x and z directions, and the negative y direction.
|
So in the above example, we scale in the positive x and z directions, and the negative y direction.
|
||||||
|
|
||||||
|
|
||||||
|
### `//copy+ <axis:x|y|z|-x|-y|-z|?|front|back|left|right|up|down> <count> [<axis> <count> [...]]`
|
||||||
|
Fully backwards-compatible with `//copy` from regular WorldEdit, but allows you to specify multiple axes at once in a single copy operation. Each successive axis in the list is specified in the form `<axis> <count>`, where:
|
||||||
|
|
||||||
|
- `<axis>` is the name of the axis to move the defined region along
|
||||||
|
- `<count>` is the number of nodes along the defined axis to move
|
||||||
|
|
||||||
|
All of the following values are valid axes:
|
||||||
|
|
||||||
|
- `x`
|
||||||
|
- `y`
|
||||||
|
- `z`
|
||||||
|
- `-x`
|
||||||
|
- `-y`
|
||||||
|
- `-z`
|
||||||
|
- `?` / `front` / `f`
|
||||||
|
- `back` / `b`
|
||||||
|
- `left` / `l`
|
||||||
|
- `right` / `r`
|
||||||
|
- `up` / `u`
|
||||||
|
- `down` / `d`
|
||||||
|
|
||||||
|
Additionally all the absolute axis names (`x`/`y`/`z`/`-x`/`-y`/`-z`) may also be specified multiple times under the same count - e.g. `xy-z 6`.
|
||||||
|
|
||||||
|
```
|
||||||
|
//copy+ x 6
|
||||||
|
//copy+ y 10 z 4
|
||||||
|
//copy+ front 6 left 5
|
||||||
|
//copy+ ? 10 r 25 y 50
|
||||||
|
//copy+ xz 50 front 22
|
||||||
|
//copy+ yx 25
|
||||||
|
//copy+ -xz-y 10
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### `//replacemix <target_node> [<chance>] <replace_node_a> [<chance_a>] [<replace_node_b> [<chance_b>]] [<replace_node_N> [<chance_N>]] ...`
|
### `//replacemix <target_node> [<chance>] <replace_node_a> [<chance_a>] [<replace_node_b> [<chance_b>]] [<replace_node_N> [<chance_N>]] ...`
|
||||||
Replaces a given node with a random mix of other nodes. Functions like `//mix`.
|
Replaces a given node with a random mix of other nodes. Functions like `//mix`.
|
||||||
|
|
||||||
|
@ -311,8 +345,6 @@ This command is best explained with examples:
|
||||||
|
|
||||||
The above functions just like `//replace` - nothing special going on here. It replaces all `dirt` nodes with `stone`.
|
The above functions just like `//replace` - nothing special going on here. It replaces all `dirt` nodes with `stone`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Let's make it more interesting:
|
Let's make it more interesting:
|
||||||
|
|
||||||
```weacmd
|
```weacmd
|
||||||
|
|
|
@ -41,6 +41,7 @@ The detailed explanations have moved! Check them out [here](https://github.com/s
|
||||||
- [`//spiral2 [<circle|square>] [<replace_node=dirt> [<interval=3> [<acceleration=0>] ] ]`](https://worldeditadditions.mooncarrot.space/Reference/#spiral2)
|
- [`//spiral2 [<circle|square>] [<replace_node=dirt> [<interval=3> [<acceleration=0>] ] ]`](https://worldeditadditions.mooncarrot.space/Reference/#spiral2)
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
|
- [`//copy+ <axis:x|y|z|-x|-y|-z|?|front|back|left|right|up|down> <count> [<axis> <count> [...]]`](https://worldeditadditions.mooncarrot.space/Reference/#copy+)
|
||||||
- [`//replacemix <target_node> [<chance>] <replace_node_a> [<chance_a>] [<replace_node_b> [<chance_b>]] [<replace_node_N> [<chance_N>]] ....`](https://worldeditadditions.mooncarrot.space/Reference/#replacemix)
|
- [`//replacemix <target_node> [<chance>] <replace_node_a> [<chance_a>] [<replace_node_b> [<chance_b>]] [<replace_node_N> [<chance_N>]] ....`](https://worldeditadditions.mooncarrot.space/Reference/#replacemix)
|
||||||
- [`//floodfill [<replace_node> [<radius>]]`](https://worldeditadditions.mooncarrot.space/Reference/#floodfill)
|
- [`//floodfill [<replace_node> [<radius>]]`](https://worldeditadditions.mooncarrot.space/Reference/#floodfill)
|
||||||
- [`//scale <axis> <scale_factor> | <factor_x> [<factor_y> <factor_z> [<anchor_x> <anchor_y> <anchor_z>]]`](https://worldeditadditions.mooncarrot.space/Reference/#scale) **experimental**
|
- [`//scale <axis> <scale_factor> | <factor_x> [<factor_y> <factor_z> [<anchor_x> <anchor_y> <anchor_z>]]`](https://worldeditadditions.mooncarrot.space/Reference/#scale) **experimental**
|
||||||
|
|
|
@ -25,7 +25,7 @@ end
|
||||||
-- ██ ██ ██ ██ ██
|
-- ██ ██ ██ ██ ██
|
||||||
-- ██████ ██████ ██ ██
|
-- ██████ ██████ ██ ██
|
||||||
worldedit.register_command("copy+", { -- TODO: Make this an override
|
worldedit.register_command("copy+", { -- TODO: Make this an override
|
||||||
params = "<axis:x|y|z|-x|-y|-z|?|front|back|left|right|up|down> <count> [mirror|mir] [<axis> <count> [mirror|mir] [...]]",
|
params = "<axis:x|y|z|-x|-y|-z|?|front|back|left|right|up|down> <count> [<axis> <count> [...]]",
|
||||||
description = "Copies the defined region to another location - potentially across multiple axes at once.",
|
description = "Copies the defined region to another location - potentially across multiple axes at once.",
|
||||||
privs = { worldedit = true },
|
privs = { worldedit = true },
|
||||||
require_pos = 2,
|
require_pos = 2,
|
||||||
|
|
Loading…
Reference in a new issue