Revert "Use "we-" prefix for commands"

This is currently being discussed, see #62.
This reverts commit 1024eace6f.
This commit is contained in:
sfan5 2014-10-25 07:53:20 +02:00
parent eb88bf6ade
commit fb49cc4bcc
6 changed files with 290 additions and 292 deletions

View File

@ -2,377 +2,375 @@ Chat Commands
------------- -------------
For more information, see the [README](README.md). For more information, see the [README](README.md).
Many commands also have shorter names that can be typed faster. For example, Many commands also have shorter names that can be typed faster. For example, if we wanted to use `//move ? 5`, we could instead type `//m ? 5`. All shortened names are listed below:
if we wanted to use `/we-move ? 5`, we could instead type `/m ? 5`.
All shortened names are listed below:
| Short Name | Original Name | | Short Name | Original Name |
|:-----------|:--------------------| |:-----------|:-------------------|
| `i` | `we-inspect` | | `//i` | `//inspect` |
| `rst` | `we-reset` | | `//rst` | `//reset` |
| `mk` | `we-mark` | | `//mk` | `//mark` |
| `umk` | `we-unmark` | | `//umk` | `//unmark` |
| `1` | `we-pos1` | | `//1` | `//pos1` |
| `2` | `we-pos2` | | `//2` | `//pos2` |
| `fp` | `we-fixedpos` | | `//fp` | `//fixedpos` |
| `v` | `we-volume` | | `//v` | `//volume` |
| `s` | `we-set` | | `//s` | `//set` |
| `r` | `we-replace` | | `//r` | `//replace` |
| `ri` | `we-replaceinverse` | | `//ri` | `//replaceinverse` |
| `hspr` | `we-hollowsphere` | | `//hspr` | `//hollowsphere` |
| `spr` | `we-sphere` | | `//spr` | `//sphere` |
| `hdo` | `we-hollowdome` | | `//hdo` | `//hollowdome` |
| `do` | `we-dome` | | `//do` | `//dome` |
| `hcyl` | `we-hollowcylinder` | | `//hcyl` | `//hollowcylinder` |
### `/we-about` ### `//about`
Get information about the mod. Get information about the mod.
/we-about //about
### `/we-inspect on/off/1/0/true/false/yes/no/enable/disable/<blank>` ### `//inspect on/off/1/0/true/false/yes/no/enable/disable/<blank>`
Enable or disable node inspection. Enable or disable node inspection.
/we-inspect on //inspect on
/we-inspect off //inspect off
/we-inspect 1 //inspect 1
/we-inspect 0 //inspect 0
/we-inspect true //inspect true
/we-inspect false //inspect false
/we-inspect yes //inspect yes
/we-inspect no //inspect no
/we-inspect enable //inspect enable
/we-inspect disable //inspect disable
/we-inspect //inspect
### `/we-reset` ### `//reset`
Reset the region so that it is empty. Reset the region so that it is empty.
/we-reset //reset
### `/we-mark` ### `//mark`
Show markers at the region positions. Show markers at the region positions.
/we-mark //mark
### `/we-unmark` ### `//unmark`
Hide markers if currently shown. Hide markers if currently shown.
/we-unmark //unmark
### `/we-pos1` ### `//pos1`
Set WorldEdit region position 1 to the player's location. Set WorldEdit region position 1 to the player's location.
/we-pos1 //pos1
### `/we-pos2` ### `//pos2`
Set WorldEdit region position 2 to the player's location. Set WorldEdit region position 2 to the player's location.
/we-pos2 //pos2
### `/we-p set/set1/set2/get` ### `//p set/set1/set2/get`
Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region. Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.
/we-p set //p set
/we-p set1 //p set1
/we-p set2 //p set2
/we-p get //p get
### `/we-fixedpos set1 x y z` ### `//fixedpos set1 x y z`
Set a WorldEdit region position to the position at (`<x>`, `<y>`, `<z>`). Set a WorldEdit region position to the position at (`<x>`, `<y>`, `<z>`).
/we-fixedpos set1 0 0 0 //fixedpos set1 0 0 0
/we-fixedpos set1 -30 5 28 //fixedpos set1 -30 5 28
/we-fixedpos set2 1004 -200 432 //fixedpos set2 1004 -200 432
### `/we-volume` ### `//volume`
Display the volume of the current WorldEdit region. Display the volume of the current WorldEdit region.
/we-volume //volume
### `/we-set <node>` ### `//set <node>`
Set the current WorldEdit region to `<node>`. Set the current WorldEdit region to `<node>`.
/we-set air //set air
/we-set cactus //set cactus
/we-set Blue Lightstone //set Blue Lightstone
/we-set dirt with grass //set dirt with grass
### `/we-mix <node1> ...` ### `//mix <node1> ...`
Fill the current WorldEdit region with a random mix of `<node1>`, `...`. Fill the current WorldEdit region with a random mix of `<node1>`, `...`.
/we-mix air //mix air
/we-mix cactus stone glass sandstone //mix cactus stone glass sandstone
/we-mix Bronze //mix Bronze
/we-mix default:cobble air //mix default:cobble air
### `/we-replace <search node> <replace node>` ### `//replace <search node> <replace node>`
Replace all instances of `<search node>` with `<replace node>` in the current WorldEdit region. Replace all instances of `<search node>` with `<replace node>` in the current WorldEdit region.
/we-replace Cobblestone air //replace Cobblestone air
/we-replace lightstone_blue glass //replace lightstone_blue glass
/we-replace dirt Bronze Block //replace dirt Bronze Block
/we-replace mesecons:wire_00000000_off flowers:flower_tulip //replace mesecons:wire_00000000_off flowers:flower_tulip
### `/we-replaceinverse <search node> <replace node>` ### `//replaceinverse <search node> <replace node>`
Replace all nodes other than `<search node>` with `<replace node>` in the current WorldEdit region. Replace all nodes other than `<search node>` with `<replace node>` in the current WorldEdit region.
/we-replaceinverse Cobblestone air //replaceinverse Cobblestone air
/we-replaceinverse flowers:flower_waterlily glass //replaceinverse flowers:flower_waterlily glass
/we-replaceinverse dirt Bronze Block //replaceinverse dirt Bronze Block
/we-replaceinverse mesecons:wire_00000000_off flowers:flower_tulip //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip
### `/we-hollowsphere <radius> <node>` ### `//hollowsphere <radius> <node>`
Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`. Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.
/we-hollowsphere 5 Diamond Block //hollowsphere 5 Diamond Block
/we-hollowsphere 12 glass //hollowsphere 12 glass
/we-hollowsphere 17 mesecons:wire_00000000_off //hollowsphere 17 mesecons:wire_00000000_off
### `/we-sphere <radius> <node>` ### `//sphere <radius> <node>`
Add sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`. Add sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.
/we-sphere 5 Diamond Block //sphere 5 Diamond Block
/we-sphere 12 glass //sphere 12 glass
/we-sphere 17 mesecons:wire_00000000_off //sphere 17 mesecons:wire_00000000_off
### `/we-hollowdome <radius> <node>` ### `//hollowdome <radius> <node>`
Add hollow dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`. Add hollow dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.
/we-hollowdome 5 Diamond Block //hollowdome 5 Diamond Block
/we-hollowdome -12 glass //hollowdome -12 glass
/we-hollowdome 17 mesecons:wire_00000000_off //hollowdome 17 mesecons:wire_00000000_off
### `/we-dome <radius> <node>` ### `//dome <radius> <node>`
Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`. Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.
/we-dome 5 Diamond Block //dome 5 Diamond Block
/we-dome -12 glass //dome -12 glass
/we-dome 17 mesecons:wire_00000000_off //dome 17 mesecons:wire_00000000_off
### `/we-hollowcylinder x/y/z/? <length> <radius> <node>` ### `//hollowcylinder x/y/z/? <length> <radius> <node>`
Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`. Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.
/we-hollowcylinder x +5 8 Bronze Block //hollowcylinder x +5 8 Bronze Block
/we-hollowcylinder y 28 10 glass //hollowcylinder y 28 10 glass
/we-hollowcylinder z -12 3 mesecons:wire_00000000_off //hollowcylinder z -12 3 mesecons:wire_00000000_off
/we-hollowcylinder ? 2 4 default:stone //hollowcylinder ? 2 4 default:stone
### `/we-cylinder x/y/z/? <length> <radius> <node>` ### `//cylinder x/y/z/? <length> <radius> <node>`
Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`. Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.
/we-cylinder x +5 8 Bronze Block //cylinder x +5 8 Bronze Block
/we-cylinder y 28 10 glass //cylinder y 28 10 glass
/we-cylinder z -12 3 mesecons:wire_00000000_off //cylinder z -12 3 mesecons:wire_00000000_off
/we-cylinder ? 2 4 default:stone //cylinder ? 2 4 default:stone
### `/we-pyramid x/y/z? <height> <node>` ### `//pyramid x/y/z? <height> <node>`
Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`. Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.
/we-pyramid x 8 Diamond Block //pyramid x 8 Diamond Block
/we-pyramid y -5 glass //pyramid y -5 glass
/we-pyramid z 2 mesecons:wire_00000000_off //pyramid z 2 mesecons:wire_00000000_off
/we-pyramid ? 12 mesecons:wire_00000000_off //pyramid ? 12 mesecons:wire_00000000_off
### `/we-spiral <length> <height> <spacer> <node>` ### `//spiral <length> <height> <spacer> <node>`
Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`. Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`.
/we-spiral 20 5 3 Diamond Block //spiral 20 5 3 Diamond Block
/we-spiral 5 2 1 glass //spiral 5 2 1 glass
/we-spiral 7 1 5 mesecons:wire_00000000_off //spiral 7 1 5 mesecons:wire_00000000_off
### `/we-copy x/y/z/? <amount>` ### `//copy x/y/z/? <amount>`
Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes. Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.
/we-copy x 15 //copy x 15
/we-copy y -7 //copy y -7
/we-copy z +4 //copy z +4
/we-copy ? 8 //copy ? 8
### `/we-move x/y/z/? <amount>` ### `//move x/y/z/? <amount>`
Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes. Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes.
/we-move x 15 //move x 15
/we-move y -7 //move y -7
/we-move z +4 //move z +4
/we-move ? -1 //move ? -1
### `/we-stack x/y/z/? <count>` ### `//stack x/y/z/? <count>`
Stack the current WorldEdit region along the x/y/z/? axis `<count>` times. Stack the current WorldEdit region along the x/y/z/? axis `<count>` times.
/we-stack x 3 //stack x 3
/we-stack y -1 //stack y -1
/we-stack z +5 //stack z +5
/we-stack ? 12 //stack ? 12
### `/we-stack2 <count> <x> <y> <z>` ### `//stack2 <count> <x> <y> <z>`
Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`. Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`.
/we-stack2 5 3 8 2 //stack2 5 3 8 2
/we-stack2 1 -1 -1 -1 //stack2 1 -1 -1 -1
### `/we-scale <factor>` ### `//scale <factor>`
Scale the current WorldEdit positions and region by a factor of positive integer `<factor>` with position 1 as the origin. Scale the current WorldEdit positions and region by a factor of positive integer `<factor>` with position 1 as the origin.
/we-scale 2 //scale 2
/we-scale 1 //scale 1
/we-scale 10 //scale 10
### `/we-transpose x/y/z/? x/y/z/?` ### `//transpose x/y/z/? x/y/z/?`
Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes. Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.
/we-transpose x y //transpose x y
/we-transpose x z //transpose x z
/we-transpose y z //transpose y z
/we-transpose ? y //transpose ? y
### `/we-flip x/y/z/?` ### `//flip x/y/z/?`
Flip the current WorldEdit region along the x/y/z/? axis. Flip the current WorldEdit region along the x/y/z/? axis.
/we-flip x //flip x
/we-flip y //flip y
/we-flip z //flip z
/we-flip ? //flip ?
### `/we-rotate x/y/z/? <angle>` ### `//rotate x/y/z/? <angle>`
Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment). Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment).
/we-rotate x 90 //rotate x 90
/we-rotate y 180 //rotate y 180
/we-rotate z 270 //rotate z 270
/we-rotate ? -90 //rotate ? -90
### `/we-orient <angle>` ### `//orient <angle>`
Rotate oriented nodes in the current WorldEdit region around the Y axis by angle `<angle>` (90 degree increment) Rotate oriented nodes in the current WorldEdit region around the Y axis by angle `<angle>` (90 degree increment)
/we-orient 90 //orient 90
/we-orient 180 //orient 180
/we-orient 270 //orient 270
/we-orient -90 //orient -90
### `/we-fixlight` ### `//fixlight`
Fixes the lighting in the current WorldEdit region. Fixes the lighting in the current WorldEdit region.
/we-fixlight //fixlight
### `/we-hide` ### `//hide`
Hide all nodes in the current WorldEdit region non-destructively. Hide all nodes in the current WorldEdit region non-destructively.
/we-hide //hide
### `/we-suppress <node>` ### `//suppress <node>`
Suppress all <node> in the current WorldEdit region non-destructively. Suppress all <node> in the current WorldEdit region non-destructively.
/we-suppress Diamond Block //suppress Diamond Block
/we-suppress glass //suppress glass
/we-suppress mesecons:wire_00000000_off //suppress mesecons:wire_00000000_off
### `/we-highlight <node>` ### `//highlight <node>`
Highlight <node> in the current WorldEdit region by hiding everything else non-destructively. Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.
/we-highlight Diamond Block //highlight Diamond Block
/we-highlight glass //highlight glass
/we-highlight mesecons:wire_00000000_off //highlight mesecons:wire_00000000_off
### `/we-restore` ### `//restore`
Restores nodes hidden with WorldEdit in the current WorldEdit region. Restores nodes hidden with WorldEdit in the current WorldEdit region.
/we-restore //restore
### `/we-save <file>` ### `//save <file>`
Save the current WorldEdit region to "(world folder)/schems/`<file>`.we". Save the current WorldEdit region to "(world folder)/schems/`<file>`.we".
/we-save some random filename //save some random filename
/we-save huge_base //save huge_base
### `/we-allocate <file>` ### `//allocate <file>`
Set the region defined by nodes from "(world folder)/schems/`<file>`.we" as the current WorldEdit region. Set the region defined by nodes from "(world folder)/schems/`<file>`.we" as the current WorldEdit region.
/we-allocate some random filename //allocate some random filename
/we-allocate huge_base //allocate huge_base
### `/we-load <file>` ### `//load <file>`
Load nodes from "(world folder)/schems/`<file>`.we" with position 1 of the current WorldEdit region as the origin. Load nodes from "(world folder)/schems/`<file>`.we" with position 1 of the current WorldEdit region as the origin.
/we-load some random filename //load some random filename
/we-load huge_base //load huge_base
### `/we-lua <code>` ### `//lua <code>`
Executes `<code>` as a Lua chunk in the global namespace. Executes `<code>` as a Lua chunk in the global namespace.
/we-lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0} //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}
/we-lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90) //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)
### `/we-luatransform <code>` ### `//luatransform <code>`
Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region. Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.
/we-luatransform minetest.add_node(pos, {name="default:stone"}) //luatransform minetest.add_node(pos, {name="default:stone"})
/we-luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"}) //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"})
### `/we-mtschemcreate <file>` ### `//mtschemcreate <file>`
Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/`<file>`.mts". Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/`<file>`.mts".
/we-mtschemcreate some random filename //mtschemcreate some random filename
/we-mtschemcreate huge_base //mtschemcreate huge_base
### `/we-mtschemplace <file>` ### `//mtschemplace <file>`
Load nodes from "(world folder)/schems/`<file>`.mts" with position 1 of the current WorldEdit region as the origin. Load nodes from "(world folder)/schems/`<file>`.mts" with position 1 of the current WorldEdit region as the origin.
/we-mtschemplace some random filename //mtschemplace some random filename
/we-mtschemplace huge_base //mtschemplace huge_base
### `/we-mtschemprob start/finish/get` ### `//mtschemprob start/finish/get`
After using `/we-mtschemprob start` all nodes punched will bring up a text field where a probablity can be entered. After using `//mtschemprob start` all nodes punched will bring up a text field where a probablity can be entered.
This mode can be left with `/we-mtschemprob finish`. `/we-mtschemprob get` will display the probabilities saved for the nodes. This mode can be left with `//mtschemprob finish`. `//mtschemprob get` will display the probabilities saved for the nodes.
/we-mtschemprob get //mtschemprob get
### `/we-clearobjects` ### `//clearobjects`
Clears all objects within the WorldEdit region. Clears all objects within the WorldEdit region.
/we-clearobjects //clearobjects

View File

@ -33,7 +33,7 @@ WorldEdit works primarily through the WorldEdit GUI and chat commands. Depending
WorldEdit has a huge potential for abuse by untrusted players. Therefore, users will not be able to use WorldEdit unless they have the `worldedit` privelege. This is available by default in single player, but in multiplayer the permission must be explicitly given by someone with the right credentials, using the follwoing chat command: `/grant <player name> worldedit`. This privelege can later be removed using the following chat command: `/revoke <player name> worldedit`. WorldEdit has a huge potential for abuse by untrusted players. Therefore, users will not be able to use WorldEdit unless they have the `worldedit` privelege. This is available by default in single player, but in multiplayer the permission must be explicitly given by someone with the right credentials, using the follwoing chat command: `/grant <player name> worldedit`. This privelege can later be removed using the following chat command: `/revoke <player name> worldedit`.
Certain functions/commands such as WorldEdit GUI's "Run Lua" function (equivalent to the `/we-lua` and `/we-luatransform` chat commands) additionally only work for the server administrator. This is because it is extremely dangerous to give access to these commands to untrusted players, since they essentially are able to control the computer the server is running on. Certain functions/commands such as WorldEdit GUI's "Run Lua" function (equivalent to the `//lua` and `//luatransform` chat command) additionally require the `server` privilege. This is because it is extremely dangerous to give access to these commands to untrusted players, since they essentially are able to control the computer the server is running on. Give this privilege only to people you trust with your computer.
For in-game information about these commands, type `/help <command name>` in the chat. For example, to learn more about the `//copy` command, simply type `/help /copy` to display information relevant to copying a region. For in-game information about these commands, type `/help <command name>` in the chat. For example, to learn more about the `//copy` command, simply type `/help /copy` to display information relevant to copying a region.
@ -81,13 +81,13 @@ Nodes
----- -----
Node names are required for many types of commands that identify or modify specific types of nodes. They can be specified in a number of ways. Node names are required for many types of commands that identify or modify specific types of nodes. They can be specified in a number of ways.
First, by description - the tooltip that appears when hovering over the item in an inventory. This is case insensitive and includes values such as "Cobblestone" and "bronze block". Note that certain commands (namely, `/we-replace` and `/we-replaceinverse`) do not support descriptions that contain spaces in the `<searchnode>` field. First, by description - the tooltip that appears when hovering over the item in an inventory. This is case insensitive and includes values such as "Cobblestone" and "bronze block". Note that certain commands (namely, `//replace` and `//replaceinverse`) do not support descriptions that contain spaces in the `<searchnode>` field.
Second, by name - the node name that is defined by code, but without the mod name prefix. This is case sensitive and includes values such as "piston_normal_off" and "cactus". Nodes defined in the `default` mod always take precedence over other nodes when searching for the correct one, and if there are multiple possible nodes (such as "a:celery" and "b:celery"), one is chosen in no particular order. Second, by name - the node name that is defined by code, but without the mod name prefix. This is case sensitive and includes values such as "piston_normal_off" and "cactus". Nodes defined in the `default` mod always take precedence over other nodes when searching for the correct one, and if there are multiple possible nodes (such as "a:celery" and "b:celery"), one is chosen in no particular order.
Finally, by full name - the unambiguous identifier of the node, prefixes and all. This is case sensitive and includes values such as "default:stone" and "mesecons:wire_00000000_off". Finally, by full name - the unambiguous identifier of the node, prefixes and all. This is case sensitive and includes values such as "default:stone" and "mesecons:wire_00000000_off".
The node name "air" can be used anywhere a normal node name can, and acts as a blank node. This is useful for clearing or removing nodes. For example, `/we-set air` would remove all the nodes in the current WorldEdit region. Similarly, `/we-sphere 10 air`, when WorldEdit position 1 underground, would dig a large sphere out of the ground. The node name "air" can be used anywhere a normal node name can, and acts as a blank node. This is useful for clearing or removing nodes. For example, `//set air` would remove all the nodes in the current WorldEdit region. Similarly, `//sphere 10 air`, when WorldEdit position 1 underground, would dig a large sphere out of the ground.
Regions Regions
------- -------
@ -130,9 +130,9 @@ Specifically it looks like this:
The ordering of the values and minor aspects of the syntax, such as trailing commas or newlines, are not guaranteed to stay the same in future versions. The ordering of the values and minor aspects of the syntax, such as trailing commas or newlines, are not guaranteed to stay the same in future versions.
The WorldEdit Schematic format is accessed via the WorldEdit API, or WorldEdit serialization chat commands such as `/save` and `/load`. The WorldEdit Schematic format is accessed via the WorldEdit API, or WorldEdit serialization chat commands such as `//serialize` and `//deserialize`.
The second is the Minetest Schematic format (MTS). The details of this format may be found in the Minetest documentation and are out of the scope of this document. Access to this format is done via specialized MTS commands such as `/we-mtschemcreate` and `/we-mtschemplace`. The second is the Minetest Schematic format (MTS). The details of this format may be found in the Minetest documentation and are out of the scope of this document. Access to this format is done via specialized MTS commands such as `//mtschemcreate` and `//mtschemplace`.
Authors Authors
------- -------

View File

@ -29,7 +29,7 @@ Step 1: Selecting a region
-------------------------- --------------------------
### Chat Commands ### Chat Commands
In the chat prompt, enter `/we-p set`. In the chat, you are prompted to punch two nodes to set the positions of the two markers. In the chat prompt, enter `//p set`. In the chat, you are prompted to punch two nodes to set the positions of the two markers.
Punch a nearby node. Be careful of breakable ones such as torches. A black cube reading "1" will appear around the node. This is the marker for WorldEdit position 1. Punch a nearby node. Be careful of breakable ones such as torches. A black cube reading "1" will appear around the node. This is the marker for WorldEdit position 1.
@ -53,13 +53,13 @@ Step 2: Region commands
----------------------- -----------------------
### Chat Commands ### Chat Commands
In the chat prompt, enter `/we-set mese`. In the chat, you will see a message showing the number of nodes set after a small delay. In the chat prompt, enter `//set mese`. In the chat, you will see a message showing the number of nodes set after a small delay.
Look at the place between the two markers: it is now filled with MESE blocks! Look at the place between the two markers: it is now filled with MESE blocks!
The `/we-set <node>` command fills the region with whatever node you want. It is a region-oriented command, which means it works inside the WorldEdit region only. The `//set <node>` command fills the region with whatever node you want. It is a region-oriented command, which means it works inside the WorldEdit region only.
Now, try a few different variations, such as `/we-set torch`, `/we-set cobble`, and `/we-set water`. Now, try a few different variations, such as `//set torch`, `//set cobble`, and `//set water`.
### WorldEdit GUI ### WorldEdit GUI
@ -81,11 +81,11 @@ Step 3: Position commands
------------------------- -------------------------
### Chat Commands ### Chat Commands
In the chat prompt, enter `/we-hollowdome 30 glass`. In the chat, you will see a message showing the number of nodes set after a small delay. In the chat prompt, enter `//hollowdome 30 glass`. In the chat, you will see a message showing the number of nodes set after a small delay.
Look around marker 1: it is now surrounded by a hollow glass dome! Look around marker 1: it is now surrounded by a hollow glass dome!
The `/we-hollowdome <radius> <node>` command creates a hollow dome centered around marker 1, made of any node you want. It is a position-oriented command, which means it works around marker 1 and can go outside the WorldEdit region. The `//hollowdome <radius> <node>` command creates a hollow dome centered around marker 1, made of any node you want. It is a position-oriented command, which means it works around marker 1 and can go outside the WorldEdit region.
### WorldEdit GUI ### WorldEdit GUI
@ -109,12 +109,12 @@ Step 4: Other commands
There are many more commands than what is shown here. See the [Chat Commands Reference](Chat Commands.md) for a detailed list of them, along with descriptions and examples for every single one. There are many more commands than what is shown here. See the [Chat Commands Reference](Chat Commands.md) for a detailed list of them, along with descriptions and examples for every single one.
If you're in-game and forgot how a command works, just use the `/help <command name>` command, without the first forward slash. For example, to see some information about the `/we-set <node>` command mentioned earlier, simply use `/help /set`. If you're in-game and forgot how a command works, just use the `/help <command name>` command, without the first forward slash. For example, to see some information about the `//set <node>` command mentioned earlier, simply use `/help /set`.
A very useful command to check out is the `/we-save <schematic>` command, which can save everything inside the WorldEdit region to a file, stored on the computer hosting the server (the player's computer, in single player mode). You can then later use `/we-load <schematic>` to load the data in a file into a world, even another world on another computer. A very useful command to check out is the `//save <schematic>` command, which can save everything inside the WorldEdit region to a file, stored on the computer hosting the server (the player's computer, in single player mode). You can then later use `//load <schematic>` to load the data in a file into a world, even another world on another computer.
### WorldEdit GUI ### WorldEdit GUI
This only scratches the surface of what WorldEdit is capable of. Most of the functions in the WorldEdit GUI correspond to chat commands, and so the [Chat Commands Reference](Chat Commands.md) may be useful if you get stuck. This only scratches the surface of what WorldEdit is capable of. Most of the functions in the WorldEdit GUI correspond to chat commands, and so the [Chat Commands Reference](Chat Commands.md) may be useful if you get stuck.
It is helpful to explore the various buttons in the interface and check out what they do. Learning the chat command interface is also useful if you use WorldEdit intensively - an experienced chat command user can usually work faster than an experienced WorldEdit GUI user. It is helpful to explore the various buttons in the interface and check out what they do. Learning the chat command interface is also useful if you use WorldEdit intensively - an experienced chat command user can usually work faster than an experienced WorldEdit GUI user.

View File

@ -72,7 +72,7 @@ worldedit.player_axis = function(name)
return "z", dir.z > 0 and 1 or -1 return "z", dir.z > 0 and 1 or -1
end end
minetest.register_chatcommand("we-about", { minetest.register_chatcommand("/about", {
params = "", params = "",
description = "Get information about the mod", description = "Get information about the mod",
func = function(name, param) func = function(name, param)
@ -80,7 +80,7 @@ minetest.register_chatcommand("we-about", {
end, end,
}) })
minetest.register_chatcommand("we-inspect", { minetest.register_chatcommand("/inspect", {
params = "on/off/1/0/true/false/yes/no/enable/disable/<blank>", params = "on/off/1/0/true/false/yes/no/enable/disable/<blank>",
description = "Enable or disable node inspection", description = "Enable or disable node inspection",
privs = {worldedit=true}, privs = {worldedit=true},
@ -113,7 +113,7 @@ minetest.register_on_punchnode(function(pos, node, puncher)
end end
end) end)
minetest.register_chatcommand("we-reset", { minetest.register_chatcommand("/reset", {
params = "", params = "",
description = "Reset the region so that it is empty", description = "Reset the region so that it is empty",
privs = {worldedit=true}, privs = {worldedit=true},
@ -127,7 +127,7 @@ minetest.register_chatcommand("we-reset", {
end, end,
}) })
minetest.register_chatcommand("we-mark", { minetest.register_chatcommand("/mark", {
params = "", params = "",
description = "Show markers at the region positions", description = "Show markers at the region positions",
privs = {worldedit=true}, privs = {worldedit=true},
@ -138,7 +138,7 @@ minetest.register_chatcommand("we-mark", {
end, end,
}) })
minetest.register_chatcommand("we-unmark", { minetest.register_chatcommand("/unmark", {
params = "", params = "",
description = "Hide markers if currently shown", description = "Hide markers if currently shown",
privs = {worldedit=true}, privs = {worldedit=true},
@ -154,7 +154,7 @@ minetest.register_chatcommand("we-unmark", {
end, end,
}) })
minetest.register_chatcommand("we-pos1", { minetest.register_chatcommand("/pos1", {
params = "", params = "",
description = "Set WorldEdit region position 1 to the player's location", description = "Set WorldEdit region position 1 to the player's location",
privs = {worldedit=true}, privs = {worldedit=true},
@ -167,7 +167,7 @@ minetest.register_chatcommand("we-pos1", {
end, end,
}) })
minetest.register_chatcommand("we-pos2", { minetest.register_chatcommand("/pos2", {
params = "", params = "",
description = "Set WorldEdit region position 2 to the player's location", description = "Set WorldEdit region position 2 to the player's location",
privs = {worldedit=true}, privs = {worldedit=true},
@ -180,7 +180,7 @@ minetest.register_chatcommand("we-pos2", {
end, end,
}) })
minetest.register_chatcommand("we-p", { minetest.register_chatcommand("/p", {
params = "set/set1/set2/get", params = "set/set1/set2/get",
description = "Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region", description = "Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region",
privs = {worldedit=true}, privs = {worldedit=true},
@ -211,7 +211,7 @@ minetest.register_chatcommand("we-p", {
end, end,
}) })
minetest.register_chatcommand("we-fixedpos", { minetest.register_chatcommand("/fixedpos", {
params = "set1/set2 x y z", params = "set1/set2 x y z",
description = "Set a WorldEdit region position to the position at (<x>, <y>, <z>)", description = "Set a WorldEdit region position to the position at (<x>, <y>, <z>)",
privs = {worldedit=true}, privs = {worldedit=true},
@ -259,7 +259,7 @@ minetest.register_on_punchnode(function(pos, node, puncher)
end end
end) end)
minetest.register_chatcommand("we-volume", { minetest.register_chatcommand("/volume", {
params = "", params = "",
description = "Display the volume of the current WorldEdit region", description = "Display the volume of the current WorldEdit region",
privs = {worldedit=true}, privs = {worldedit=true},
@ -279,7 +279,7 @@ minetest.register_chatcommand("we-volume", {
end, end,
}) })
minetest.register_chatcommand("we-set", { minetest.register_chatcommand("/set", {
params = "<node>", params = "<node>",
description = "Set the current WorldEdit region to <node>", description = "Set the current WorldEdit region to <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -295,7 +295,7 @@ minetest.register_chatcommand("we-set", {
end, check_region), end, check_region),
}) })
minetest.register_chatcommand("we-mix", { minetest.register_chatcommand("/mix", {
params = "<node1> ...", params = "<node1> ...",
description = "Fill the current WorldEdit region with a random mix of <node1>, ...", description = "Fill the current WorldEdit region with a random mix of <node1>, ...",
privs = {worldedit=true}, privs = {worldedit=true},
@ -335,7 +335,7 @@ local check_replace = function(name, param)
return check_region(name, param) return check_region(name, param)
end end
minetest.register_chatcommand("we-replace", { minetest.register_chatcommand("/replace", {
params = "<search node> <replace node>", params = "<search node> <replace node>",
description = "Replace all instances of <search node> with <replace node> in the current WorldEdit region", description = "Replace all instances of <search node> with <replace node> in the current WorldEdit region",
privs = {worldedit=true}, privs = {worldedit=true},
@ -348,7 +348,7 @@ minetest.register_chatcommand("we-replace", {
end, check_replace), end, check_replace),
}) })
minetest.register_chatcommand("we-replaceinverse", { minetest.register_chatcommand("/replaceinverse", {
params = "<search node> <replace node>", params = "<search node> <replace node>",
description = "Replace all nodes other than <search node> with <replace node> in the current WorldEdit region", description = "Replace all nodes other than <search node> with <replace node> in the current WorldEdit region",
privs = {worldedit=true}, privs = {worldedit=true},
@ -376,7 +376,7 @@ local check_sphere = function(name, param)
return math.ceil((4 * math.pi * (tonumber(radius) ^ 3)) / 3) --volume of sphere return math.ceil((4 * math.pi * (tonumber(radius) ^ 3)) / 3) --volume of sphere
end end
minetest.register_chatcommand("we-hollowsphere", { minetest.register_chatcommand("/hollowsphere", {
params = "<radius> <node>", params = "<radius> <node>",
description = "Add hollow sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>", description = "Add hollow sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -388,7 +388,7 @@ minetest.register_chatcommand("we-hollowsphere", {
end, check_sphere), end, check_sphere),
}) })
minetest.register_chatcommand("we-sphere", { minetest.register_chatcommand("/sphere", {
params = "<radius> <node>", params = "<radius> <node>",
description = "Add sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>", description = "Add sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -415,7 +415,7 @@ local check_dome = function(name, param)
return math.ceil((2 * math.pi * (tonumber(radius) ^ 3)) / 3) --volume of dome return math.ceil((2 * math.pi * (tonumber(radius) ^ 3)) / 3) --volume of dome
end end
minetest.register_chatcommand("we-hollowdome", { minetest.register_chatcommand("/hollowdome", {
params = "<radius> <node>", params = "<radius> <node>",
description = "Add hollow dome centered at WorldEdit position 1 with radius <radius>, composed of <node>", description = "Add hollow dome centered at WorldEdit position 1 with radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -427,7 +427,7 @@ minetest.register_chatcommand("we-hollowdome", {
end, check_dome), end, check_dome),
}) })
minetest.register_chatcommand("we-dome", { minetest.register_chatcommand("/dome", {
params = "<radius> <node>", params = "<radius> <node>",
description = "Add dome centered at WorldEdit position 1 with radius <radius>, composed of <node>", description = "Add dome centered at WorldEdit position 1 with radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -454,7 +454,7 @@ local check_cylinder = function(name, param)
return math.ceil(math.pi * (tonumber(radius) ^ 2) * tonumber(length)) return math.ceil(math.pi * (tonumber(radius) ^ 2) * tonumber(length))
end end
minetest.register_chatcommand("we-hollowcylinder", { minetest.register_chatcommand("/hollowcylinder", {
params = "x/y/z/? <length> <radius> <node>", params = "x/y/z/? <length> <radius> <node>",
description = "Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>", description = "Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -471,7 +471,7 @@ minetest.register_chatcommand("we-hollowcylinder", {
end, check_cylinder), end, check_cylinder),
}) })
minetest.register_chatcommand("we-cylinder", { minetest.register_chatcommand("/cylinder", {
params = "x/y/z/? <length> <radius> <node>", params = "x/y/z/? <length> <radius> <node>",
description = "Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>", description = "Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -488,7 +488,7 @@ minetest.register_chatcommand("we-cylinder", {
end, check_cylinder), end, check_cylinder),
}) })
minetest.register_chatcommand("we-pyramid", { minetest.register_chatcommand("/pyramid", {
params = "x/y/z/? <height> <node>", params = "x/y/z/? <height> <node>",
description = "Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height <height>, composed of <node>", description = "Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height <height>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -520,7 +520,7 @@ minetest.register_chatcommand("we-pyramid", {
end), end),
}) })
minetest.register_chatcommand("we-spiral", { minetest.register_chatcommand("/spiral", {
params = "<length> <height> <space> <node>", params = "<length> <height> <space> <node>",
description = "Add spiral centered at WorldEdit position 1 with side length <length>, height <height>, space between walls <space>, composed of <node>", description = "Add spiral centered at WorldEdit position 1 with side length <length>, height <height>, space between walls <space>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -546,7 +546,7 @@ minetest.register_chatcommand("we-spiral", {
end), end),
}) })
minetest.register_chatcommand("we-copy", { minetest.register_chatcommand("/copy", {
params = "x/y/z/? <amount>", params = "x/y/z/? <amount>",
description = "Copy the current WorldEdit region along the x/y/z/? axis by <amount> nodes", description = "Copy the current WorldEdit region along the x/y/z/? axis by <amount> nodes",
privs = {worldedit=true}, privs = {worldedit=true},
@ -571,7 +571,7 @@ minetest.register_chatcommand("we-copy", {
end), end),
}) })
minetest.register_chatcommand("we-move", { minetest.register_chatcommand("/move", {
params = "x/y/z/? <amount>", params = "x/y/z/? <amount>",
description = "Move the current WorldEdit region along the x/y/z/? axis by <amount> nodes", description = "Move the current WorldEdit region along the x/y/z/? axis by <amount> nodes",
privs = {worldedit=true}, privs = {worldedit=true},
@ -598,7 +598,7 @@ minetest.register_chatcommand("we-move", {
end, check_region), end, check_region),
}) })
minetest.register_chatcommand("we-stack", { minetest.register_chatcommand("/stack", {
params = "x/y/z/? <count>", params = "x/y/z/? <count>",
description = "Stack the current WorldEdit region along the x/y/z/? axis <count> times", description = "Stack the current WorldEdit region along the x/y/z/? axis <count> times",
privs = {worldedit=true}, privs = {worldedit=true},
@ -624,7 +624,7 @@ minetest.register_chatcommand("we-stack", {
end), end),
}) })
minetest.register_chatcommand("we-stack2", { minetest.register_chatcommand("/stack2", {
params = "<count> <x> <y> <z>", params = "<count> <x> <y> <z>",
description = "Stack the current WorldEdit region <count> times by offset <x>, <y>, <z>", description = "Stack the current WorldEdit region <count> times by offset <x>, <y>, <z>",
privs = {worldedit=true}, privs = {worldedit=true},
@ -660,7 +660,7 @@ minetest.register_chatcommand("we-stack2", {
}) })
minetest.register_chatcommand("we-stretch", { minetest.register_chatcommand("/stretch", {
params = "<stretchx> <stretchy> <stretchz>", params = "<stretchx> <stretchy> <stretchz>",
description = "Scale the current WorldEdit positions and region by a factor of <stretchx>, <stretchy>, <stretchz> along the X, Y, and Z axes, repectively, with position 1 as the origin", description = "Scale the current WorldEdit positions and region by a factor of <stretchx>, <stretchy>, <stretchz> along the X, Y, and Z axes, repectively, with position 1 as the origin",
privs = {worldedit=true}, privs = {worldedit=true},
@ -694,7 +694,7 @@ minetest.register_chatcommand("we-stretch", {
end), end),
}) })
minetest.register_chatcommand("we-transpose", { minetest.register_chatcommand("/transpose", {
params = "x/y/z/? x/y/z/?", params = "x/y/z/? x/y/z/?",
description = "Transpose the current WorldEdit region along the x/y/z/? and x/y/z/? axes", description = "Transpose the current WorldEdit region along the x/y/z/? and x/y/z/? axes",
privs = {worldedit=true}, privs = {worldedit=true},
@ -727,7 +727,7 @@ minetest.register_chatcommand("we-transpose", {
end), end),
}) })
minetest.register_chatcommand("we-flip", { minetest.register_chatcommand("/flip", {
params = "x/y/z/?", params = "x/y/z/?",
description = "Flip the current WorldEdit region along the x/y/z/? axis", description = "Flip the current WorldEdit region along the x/y/z/? axis",
privs = {worldedit=true}, privs = {worldedit=true},
@ -745,7 +745,7 @@ minetest.register_chatcommand("we-flip", {
end), end),
}) })
minetest.register_chatcommand("we-rotate", { minetest.register_chatcommand("/rotate", {
params = "<axis> <angle>", params = "<axis> <angle>",
description = "Rotate the current WorldEdit region around the axis <axis> by angle <angle> (90 degree increment)", description = "Rotate the current WorldEdit region around the axis <axis> by angle <angle> (90 degree increment)",
privs = {worldedit=true}, privs = {worldedit=true},
@ -777,7 +777,7 @@ minetest.register_chatcommand("we-rotate", {
end), end),
}) })
minetest.register_chatcommand("we-orient", { minetest.register_chatcommand("/orient", {
params = "<angle>", params = "<angle>",
description = "Rotate oriented nodes in the current WorldEdit region around the Y axis by angle <angle> (90 degree increment)", description = "Rotate oriented nodes in the current WorldEdit region around the Y axis by angle <angle> (90 degree increment)",
privs = {worldedit=true}, privs = {worldedit=true},
@ -800,7 +800,7 @@ minetest.register_chatcommand("we-orient", {
end), end),
}) })
minetest.register_chatcommand("we-fixlight", { minetest.register_chatcommand("/fixlight", {
params = "", params = "",
description = "Fix the lighting in the current WorldEdit region", description = "Fix the lighting in the current WorldEdit region",
privs = {worldedit=true}, privs = {worldedit=true},
@ -810,7 +810,7 @@ minetest.register_chatcommand("we-fixlight", {
end), end),
}) })
minetest.register_chatcommand("we-hide", { minetest.register_chatcommand("/hide", {
params = "", params = "",
description = "Hide all nodes in the current WorldEdit region non-destructively", description = "Hide all nodes in the current WorldEdit region non-destructively",
privs = {worldedit=true}, privs = {worldedit=true},
@ -820,7 +820,7 @@ minetest.register_chatcommand("we-hide", {
end), end),
}) })
minetest.register_chatcommand("we-suppress", { minetest.register_chatcommand("/suppress", {
params = "<node>", params = "<node>",
description = "Suppress all <node> in the current WorldEdit region non-destructively", description = "Suppress all <node> in the current WorldEdit region non-destructively",
privs = {worldedit=true}, privs = {worldedit=true},
@ -831,7 +831,7 @@ minetest.register_chatcommand("we-suppress", {
end, check_set), end, check_set),
}) })
minetest.register_chatcommand("we-highlight", { minetest.register_chatcommand("/highlight", {
params = "<node>", params = "<node>",
description = "Highlight <node> in the current WorldEdit region by hiding everything else non-destructively", description = "Highlight <node> in the current WorldEdit region by hiding everything else non-destructively",
privs = {worldedit=true}, privs = {worldedit=true},
@ -842,7 +842,7 @@ minetest.register_chatcommand("we-highlight", {
end, check_set), end, check_set),
}) })
minetest.register_chatcommand("we-restore", { minetest.register_chatcommand("/restore", {
params = "", params = "",
description = "Restores nodes hidden with WorldEdit in the current WorldEdit region", description = "Restores nodes hidden with WorldEdit in the current WorldEdit region",
privs = {worldedit=true}, privs = {worldedit=true},
@ -852,7 +852,7 @@ minetest.register_chatcommand("we-restore", {
end), end),
}) })
minetest.register_chatcommand("we-save", { minetest.register_chatcommand("/save", {
params = "<file>", params = "<file>",
description = "Save the current WorldEdit region to \"(world folder)/schems/<file>.we\"", description = "Save the current WorldEdit region to \"(world folder)/schems/<file>.we\"",
privs = {worldedit=true}, privs = {worldedit=true},
@ -885,7 +885,7 @@ minetest.register_chatcommand("we-save", {
end), end),
}) })
minetest.register_chatcommand("we-allocate", { minetest.register_chatcommand("/allocate", {
params = "<file>", params = "<file>",
description = "Set the region defined by nodes from \"(world folder)/schems/<file>.we\" as the current WorldEdit region", description = "Set the region defined by nodes from \"(world folder)/schems/<file>.we\" as the current WorldEdit region",
privs = {worldedit=true}, privs = {worldedit=true},
@ -929,7 +929,7 @@ minetest.register_chatcommand("we-allocate", {
end, end,
}) })
minetest.register_chatcommand("we-load", { minetest.register_chatcommand("/load", {
params = "<file>", params = "<file>",
description = "Load nodes from \"(world folder)/schems/<file>[.we[m]]\" with position 1 of the current WorldEdit region as the origin", description = "Load nodes from \"(world folder)/schems/<file>[.we[m]]\" with position 1 of the current WorldEdit region as the origin",
privs = {worldedit=true}, privs = {worldedit=true},
@ -981,7 +981,7 @@ minetest.register_chatcommand("we-load", {
end, end,
}) })
minetest.register_chatcommand("we-lua", { minetest.register_chatcommand("/lua", {
params = "<code>", params = "<code>",
description = "Executes <code> as a Lua chunk in the global namespace", description = "Executes <code> as a Lua chunk in the global namespace",
privs = {worldedit=true, server=true}, privs = {worldedit=true, server=true},
@ -1000,7 +1000,7 @@ minetest.register_chatcommand("we-lua", {
end, end,
}) })
minetest.register_chatcommand("we-luatransform", { minetest.register_chatcommand("/luatransform", {
params = "<code>", params = "<code>",
description = "Executes <code> as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region", description = "Executes <code> as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region",
privs = {worldedit=true, server=true}, privs = {worldedit=true, server=true},
@ -1020,7 +1020,7 @@ minetest.register_chatcommand("we-luatransform", {
end), end),
}) })
minetest.register_chatcommand("we-mtschemcreate", { minetest.register_chatcommand("/mtschemcreate", {
params = "<file>", params = "<file>",
description = "Save the current WorldEdit region using the Minetest Schematic format to \"(world folder)/schems/<filename>.mts\"", description = "Save the current WorldEdit region using the Minetest Schematic format to \"(world folder)/schems/<filename>.mts\"",
privs = {worldedit=true}, privs = {worldedit=true},
@ -1045,7 +1045,7 @@ minetest.register_chatcommand("we-mtschemcreate", {
end), end),
}) })
minetest.register_chatcommand("we-mtschemplace", { minetest.register_chatcommand("/mtschemplace", {
params = "<file>", params = "<file>",
description = "Load nodes from \"(world folder)/schems/<file>.mts\" with position 1 of the current WorldEdit region as the origin", description = "Load nodes from \"(world folder)/schems/<file>.mts\" with position 1 of the current WorldEdit region as the origin",
privs = {worldedit=true}, privs = {worldedit=true},
@ -1068,7 +1068,7 @@ minetest.register_chatcommand("we-mtschemplace", {
end, end,
}) })
minetest.register_chatcommand("we-mtschemprob", { minetest.register_chatcommand("/mtschemprob", {
params = "start/finish/get", params = "start/finish/get",
description = "Begins node probability entry for Minetest schematics, gets the nodes that have probabilities set, or ends node probability entry", description = "Begins node probability entry for Minetest schematics, gets the nodes that have probabilities set, or ends node probability entry",
privs = {worldedit=true}, privs = {worldedit=true},
@ -1109,7 +1109,7 @@ minetest.register_on_player_receive_fields(
end end
) )
minetest.register_chatcommand("we-clearobjects", { minetest.register_chatcommand("/clearobjects", {
params = "", params = "",
description = "Clears all objects within the WorldEdit region", description = "Clears all objects within the WorldEdit region",
privs = {worldedit=true}, privs = {worldedit=true},

View File

@ -26,11 +26,11 @@ safe_region = function(callback, nodes_needed)
--save callback to call later --save callback to call later
safe_region_callback[name], safe_region_param[name] = callback, param safe_region_callback[name], safe_region_param[name] = callback, param
worldedit.player_notify(name, "WARNING: this operation could affect up to " .. count .. " nodes; type /we-y to continue or /we-n to cancel") worldedit.player_notify(name, "WARNING: this operation could affect up to " .. count .. " nodes; type //y to continue or //n to cancel")
end end
end end
minetest.register_chatcommand("we-y", { minetest.register_chatcommand("/y", {
params = "", params = "",
description = "Confirm a pending operation", description = "Confirm a pending operation",
func = function(name) func = function(name)
@ -52,7 +52,7 @@ minetest.register_chatcommand("we-y", {
end, end,
}) })
minetest.register_chatcommand("we-n", { minetest.register_chatcommand("/n", {
params = "", params = "",
description = "Confirm a pending operation", description = "Confirm a pending operation",
func = function(name) func = function(name)

View File

@ -2,7 +2,7 @@
--returns true if command could not be aliased, false otherwise --returns true if command could not be aliased, false otherwise
worldedit.alias_chatcommand = function(alias, original_command) worldedit.alias_chatcommand = function(alias, original_command)
if not minetest.chatcommands["we-"..original_command] then if not minetest.chatcommands[original_command] then
minetest.log("error", "worldedit_shortcommands: original command " .. original_command .. " does not exist") minetest.log("error", "worldedit_shortcommands: original command " .. original_command .. " does not exist")
return true return true
end end
@ -10,41 +10,41 @@ worldedit.alias_chatcommand = function(alias, original_command)
minetest.log("error", "worldedit_shortcommands: alias " .. alias .. " already exists") minetest.log("error", "worldedit_shortcommands: alias " .. alias .. " already exists")
return true return true
end end
minetest.register_chatcommand(alias, minetest.chatcommands["we-"..original_command]) minetest.register_chatcommand(alias, minetest.chatcommands[original_command])
return false return false
end end
worldedit.alias_chatcommand("i", "inspect") worldedit.alias_chatcommand("/i", "/inspect")
worldedit.alias_chatcommand("rst", "reset") worldedit.alias_chatcommand("/rst", "/reset")
worldedit.alias_chatcommand("mk", "mark") worldedit.alias_chatcommand("/mk", "/mark")
worldedit.alias_chatcommand("umk", "unmark") worldedit.alias_chatcommand("/umk", "/unmark")
worldedit.alias_chatcommand("1", "pos1") worldedit.alias_chatcommand("/1", "/pos1")
worldedit.alias_chatcommand("2", "pos2") worldedit.alias_chatcommand("/2", "/pos2")
worldedit.alias_chatcommand("fp", "fixedpos") worldedit.alias_chatcommand("/fp", "/fixedpos")
worldedit.alias_chatcommand("v", "volume") worldedit.alias_chatcommand("/v", "/volume")
worldedit.alias_chatcommand("s", "set") worldedit.alias_chatcommand("/s", "/set")
worldedit.alias_chatcommand("r", "replace") worldedit.alias_chatcommand("/r", "/replace")
worldedit.alias_chatcommand("ri", "replaceinverse") worldedit.alias_chatcommand("/ri", "/replaceinverse")
worldedit.alias_chatcommand("hspr", "hollowsphere") worldedit.alias_chatcommand("/hspr", "/hollowsphere")
worldedit.alias_chatcommand("spr", "sphere") worldedit.alias_chatcommand("/spr", "/sphere")
worldedit.alias_chatcommand("hdo", "hollowdome") worldedit.alias_chatcommand("/hdo", "/hollowdome")
worldedit.alias_chatcommand("do", "dome") worldedit.alias_chatcommand("/do", "/dome")
worldedit.alias_chatcommand("hcyl", "hollowcylinder") worldedit.alias_chatcommand("/hcyl", "/hollowcylinder")
worldedit.alias_chatcommand("cyl", "cylinder") worldedit.alias_chatcommand("/cyl", "/cylinder")
worldedit.alias_chatcommand("pyr", "pyramid") worldedit.alias_chatcommand("/pyr", "/pyramid")
worldedit.alias_chatcommand("spl", "spiral") worldedit.alias_chatcommand("/spl", "/spiral")
worldedit.alias_chatcommand("m", "move") worldedit.alias_chatcommand("/m", "/move")
worldedit.alias_chatcommand("c", "copy") worldedit.alias_chatcommand("/c", "/copy")
worldedit.alias_chatcommand("stk", "stack") worldedit.alias_chatcommand("/stk", "/stack")
worldedit.alias_chatcommand("sch", "stretch") worldedit.alias_chatcommand("/sch", "/stretch")
worldedit.alias_chatcommand("tps", "transpose") worldedit.alias_chatcommand("/tps", "/transpose")
worldedit.alias_chatcommand("fl", "flip") worldedit.alias_chatcommand("/fl", "/flip")
worldedit.alias_chatcommand("rot", "rotate") worldedit.alias_chatcommand("/rot", "/rotate")
worldedit.alias_chatcommand("ort", "orient") worldedit.alias_chatcommand("/ort", "/orient")
worldedit.alias_chatcommand("hi", "hide") worldedit.alias_chatcommand("/hi", "/hide")
worldedit.alias_chatcommand("sup", "suppress") worldedit.alias_chatcommand("/sup", "/suppress")
worldedit.alias_chatcommand("hlt", "highlight") worldedit.alias_chatcommand("/hlt", "/highlight")
worldedit.alias_chatcommand("rsr", "restore") worldedit.alias_chatcommand("/rsr", "/restore")
worldedit.alias_chatcommand("l", "lua") worldedit.alias_chatcommand("/l", "/lua")
worldedit.alias_chatcommand("lt", "luatransform") worldedit.alias_chatcommand("/lt", "/luatransform")
worldedit.alias_chatcommand("clro", "clearobjects") worldedit.alias_chatcommand("/clro", "/clearobjects")