Skip to content

Commit 02c36c1

Browse files
committedOct 24, 2014
Merge pull request #62 from ShadowNinja/command-prefix
Use "we-" prefix for commands
2 parents 70c24c9 + 1024eac commit 02c36c1

File tree

6 files changed

+294
-292
lines changed

6 files changed

+294
-292
lines changed
 

‎Chat Commands.md

+196-194
Large diffs are not rendered by default.

‎README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ WorldEdit works primarily through the WorldEdit GUI and chat commands. Depending
3333

3434
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`.
3535

36-
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.
36+
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.
3737

3838
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.
3939

@@ -81,13 +81,13 @@ Nodes
8181
-----
8282
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.
8383

84-
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.
84+
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.
8585

8686
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.
8787

8888
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".
8989

90-
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.
90+
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.
9191

9292
Regions
9393
-------
@@ -126,9 +126,9 @@ The current version of the WorldEdit Schematic format, internally known as versi
126126

127127
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.
128128

129-
The WorldEdit Schematic format is accessed via the WorldEdit API, or WorldEdit serialization chat commands such as `//serialize` and `//deserialize`.
129+
The WorldEdit Schematic format is accessed via the WorldEdit API, or WorldEdit serialization chat commands such as `/save` and `/load`.
130130

131-
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`.
131+
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`.
132132

133133
Authors
134134
-------

‎Tutorial.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Step 1: Selecting a region
2929
--------------------------
3030
### Chat Commands
3131

32-
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.
32+
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.
3333

3434
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.
3535

@@ -53,13 +53,13 @@ Step 2: Region commands
5353
-----------------------
5454
### Chat Commands
5555

56-
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.
56+
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.
5757

5858
Look at the place between the two markers: it is now filled with MESE blocks!
5959

60-
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.
60+
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.
6161

62-
Now, try a few different variations, such as `//set torch`, `//set cobble`, and `//set water`.
62+
Now, try a few different variations, such as `/we-set torch`, `/we-set cobble`, and `/we-set water`.
6363

6464
### WorldEdit GUI
6565

@@ -81,11 +81,11 @@ Step 3: Position commands
8181
-------------------------
8282
### Chat Commands
8383

84-
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.
84+
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.
8585

8686
Look around marker 1: it is now surrounded by a hollow glass dome!
8787

88-
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.
88+
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.
8989

9090
### WorldEdit GUI
9191

@@ -109,12 +109,12 @@ Step 4: Other commands
109109

110110
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.
111111

112-
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`.
112+
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`.
113113

114-
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.
114+
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.
115115

116116
### WorldEdit GUI
117117

118118
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.
119119

120-
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.
120+
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.

‎worldedit_commands/init.lua

+45-45
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ worldedit.player_axis = function(name)
7272
return "z", dir.z > 0 and 1 or -1
7373
end
7474

75-
minetest.register_chatcommand("/about", {
75+
minetest.register_chatcommand("we-about", {
7676
params = "",
7777
description = "Get information about the mod",
7878
func = function(name, param)
7979
worldedit.player_notify(name, "WorldEdit " .. worldedit.version_string .. " is available on this server. Type /help to get a list of commands, or get more information at https://github.com/Uberi/MineTest-WorldEdit/")
8080
end,
8181
})
8282

83-
minetest.register_chatcommand("/inspect", {
83+
minetest.register_chatcommand("we-inspect", {
8484
params = "on/off/1/0/true/false/yes/no/enable/disable/<blank>",
8585
description = "Enable or disable node inspection",
8686
privs = {worldedit=true},
@@ -113,7 +113,7 @@ minetest.register_on_punchnode(function(pos, node, puncher)
113113
end
114114
end)
115115

116-
minetest.register_chatcommand("/reset", {
116+
minetest.register_chatcommand("we-reset", {
117117
params = "",
118118
description = "Reset the region so that it is empty",
119119
privs = {worldedit=true},
@@ -127,7 +127,7 @@ minetest.register_chatcommand("/reset", {
127127
end,
128128
})
129129

130-
minetest.register_chatcommand("/mark", {
130+
minetest.register_chatcommand("we-mark", {
131131
params = "",
132132
description = "Show markers at the region positions",
133133
privs = {worldedit=true},
@@ -138,7 +138,7 @@ minetest.register_chatcommand("/mark", {
138138
end,
139139
})
140140

141-
minetest.register_chatcommand("/unmark", {
141+
minetest.register_chatcommand("we-unmark", {
142142
params = "",
143143
description = "Hide markers if currently shown",
144144
privs = {worldedit=true},
@@ -154,7 +154,7 @@ minetest.register_chatcommand("/unmark", {
154154
end,
155155
})
156156

157-
minetest.register_chatcommand("/pos1", {
157+
minetest.register_chatcommand("we-pos1", {
158158
params = "",
159159
description = "Set WorldEdit region position 1 to the player's location",
160160
privs = {worldedit=true},
@@ -167,7 +167,7 @@ minetest.register_chatcommand("/pos1", {
167167
end,
168168
})
169169

170-
minetest.register_chatcommand("/pos2", {
170+
minetest.register_chatcommand("we-pos2", {
171171
params = "",
172172
description = "Set WorldEdit region position 2 to the player's location",
173173
privs = {worldedit=true},
@@ -180,7 +180,7 @@ minetest.register_chatcommand("/pos2", {
180180
end,
181181
})
182182

183-
minetest.register_chatcommand("/p", {
183+
minetest.register_chatcommand("we-p", {
184184
params = "set/set1/set2/get",
185185
description = "Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region",
186186
privs = {worldedit=true},
@@ -211,7 +211,7 @@ minetest.register_chatcommand("/p", {
211211
end,
212212
})
213213

214-
minetest.register_chatcommand("/fixedpos", {
214+
minetest.register_chatcommand("we-fixedpos", {
215215
params = "set1/set2 x y z",
216216
description = "Set a WorldEdit region position to the position at (<x>, <y>, <z>)",
217217
privs = {worldedit=true},
@@ -259,7 +259,7 @@ minetest.register_on_punchnode(function(pos, node, puncher)
259259
end
260260
end)
261261

262-
minetest.register_chatcommand("/volume", {
262+
minetest.register_chatcommand("we-volume", {
263263
params = "",
264264
description = "Display the volume of the current WorldEdit region",
265265
privs = {worldedit=true},
@@ -279,7 +279,7 @@ minetest.register_chatcommand("/volume", {
279279
end,
280280
})
281281

282-
minetest.register_chatcommand("/set", {
282+
minetest.register_chatcommand("we-set", {
283283
params = "<node>",
284284
description = "Set the current WorldEdit region to <node>",
285285
privs = {worldedit=true},
@@ -295,7 +295,7 @@ minetest.register_chatcommand("/set", {
295295
end, check_region),
296296
})
297297

298-
minetest.register_chatcommand("/mix", {
298+
minetest.register_chatcommand("we-mix", {
299299
params = "<node1> ...",
300300
description = "Fill the current WorldEdit region with a random mix of <node1>, ...",
301301
privs = {worldedit=true},
@@ -335,7 +335,7 @@ local check_replace = function(name, param)
335335
return check_region(name, param)
336336
end
337337

338-
minetest.register_chatcommand("/replace", {
338+
minetest.register_chatcommand("we-replace", {
339339
params = "<search node> <replace node>",
340340
description = "Replace all instances of <search node> with <replace node> in the current WorldEdit region",
341341
privs = {worldedit=true},
@@ -348,7 +348,7 @@ minetest.register_chatcommand("/replace", {
348348
end, check_replace),
349349
})
350350

351-
minetest.register_chatcommand("/replaceinverse", {
351+
minetest.register_chatcommand("we-replaceinverse", {
352352
params = "<search node> <replace node>",
353353
description = "Replace all nodes other than <search node> with <replace node> in the current WorldEdit region",
354354
privs = {worldedit=true},
@@ -376,7 +376,7 @@ local check_sphere = function(name, param)
376376
return math.ceil((4 * math.pi * (tonumber(radius) ^ 3)) / 3) --volume of sphere
377377
end
378378

379-
minetest.register_chatcommand("/hollowsphere", {
379+
minetest.register_chatcommand("we-hollowsphere", {
380380
params = "<radius> <node>",
381381
description = "Add hollow sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>",
382382
privs = {worldedit=true},
@@ -388,7 +388,7 @@ minetest.register_chatcommand("/hollowsphere", {
388388
end, check_sphere),
389389
})
390390

391-
minetest.register_chatcommand("/sphere", {
391+
minetest.register_chatcommand("we-sphere", {
392392
params = "<radius> <node>",
393393
description = "Add sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>",
394394
privs = {worldedit=true},
@@ -415,7 +415,7 @@ local check_dome = function(name, param)
415415
return math.ceil((2 * math.pi * (tonumber(radius) ^ 3)) / 3) --volume of dome
416416
end
417417

418-
minetest.register_chatcommand("/hollowdome", {
418+
minetest.register_chatcommand("we-hollowdome", {
419419
params = "<radius> <node>",
420420
description = "Add hollow dome centered at WorldEdit position 1 with radius <radius>, composed of <node>",
421421
privs = {worldedit=true},
@@ -427,7 +427,7 @@ minetest.register_chatcommand("/hollowdome", {
427427
end, check_dome),
428428
})
429429

430-
minetest.register_chatcommand("/dome", {
430+
minetest.register_chatcommand("we-dome", {
431431
params = "<radius> <node>",
432432
description = "Add dome centered at WorldEdit position 1 with radius <radius>, composed of <node>",
433433
privs = {worldedit=true},
@@ -454,7 +454,7 @@ local check_cylinder = function(name, param)
454454
return math.ceil(math.pi * (tonumber(radius) ^ 2) * tonumber(length))
455455
end
456456

457-
minetest.register_chatcommand("/hollowcylinder", {
457+
minetest.register_chatcommand("we-hollowcylinder", {
458458
params = "x/y/z/? <length> <radius> <node>",
459459
description = "Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>",
460460
privs = {worldedit=true},
@@ -471,7 +471,7 @@ minetest.register_chatcommand("/hollowcylinder", {
471471
end, check_cylinder),
472472
})
473473

474-
minetest.register_chatcommand("/cylinder", {
474+
minetest.register_chatcommand("we-cylinder", {
475475
params = "x/y/z/? <length> <radius> <node>",
476476
description = "Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>",
477477
privs = {worldedit=true},
@@ -488,7 +488,7 @@ minetest.register_chatcommand("/cylinder", {
488488
end, check_cylinder),
489489
})
490490

491-
minetest.register_chatcommand("/pyramid", {
491+
minetest.register_chatcommand("we-pyramid", {
492492
params = "x/y/z/? <height> <node>",
493493
description = "Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height <height>, composed of <node>",
494494
privs = {worldedit=true},
@@ -520,7 +520,7 @@ minetest.register_chatcommand("/pyramid", {
520520
end),
521521
})
522522

523-
minetest.register_chatcommand("/spiral", {
523+
minetest.register_chatcommand("we-spiral", {
524524
params = "<length> <height> <space> <node>",
525525
description = "Add spiral centered at WorldEdit position 1 with side length <length>, height <height>, space between walls <space>, composed of <node>",
526526
privs = {worldedit=true},
@@ -546,7 +546,7 @@ minetest.register_chatcommand("/spiral", {
546546
end),
547547
})
548548

549-
minetest.register_chatcommand("/copy", {
549+
minetest.register_chatcommand("we-copy", {
550550
params = "x/y/z/? <amount>",
551551
description = "Copy the current WorldEdit region along the x/y/z/? axis by <amount> nodes",
552552
privs = {worldedit=true},
@@ -571,7 +571,7 @@ minetest.register_chatcommand("/copy", {
571571
end),
572572
})
573573

574-
minetest.register_chatcommand("/move", {
574+
minetest.register_chatcommand("we-move", {
575575
params = "x/y/z/? <amount>",
576576
description = "Move the current WorldEdit region along the x/y/z/? axis by <amount> nodes",
577577
privs = {worldedit=true},
@@ -598,7 +598,7 @@ minetest.register_chatcommand("/move", {
598598
end, check_region),
599599
})
600600

601-
minetest.register_chatcommand("/stack", {
601+
minetest.register_chatcommand("we-stack", {
602602
params = "x/y/z/? <count>",
603603
description = "Stack the current WorldEdit region along the x/y/z/? axis <count> times",
604604
privs = {worldedit=true},
@@ -624,7 +624,7 @@ minetest.register_chatcommand("/stack", {
624624
end),
625625
})
626626

627-
minetest.register_chatcommand("/stack2", {
627+
minetest.register_chatcommand("we-stack2", {
628628
params = "<count> <x> <y> <z>",
629629
description = "Stack the current WorldEdit region <count> times by offset <x>, <y>, <z>",
630630
privs = {worldedit=true},
@@ -660,7 +660,7 @@ minetest.register_chatcommand("/stack2", {
660660
})
661661

662662

663-
minetest.register_chatcommand("/stretch", {
663+
minetest.register_chatcommand("we-stretch", {
664664
params = "<stretchx> <stretchy> <stretchz>",
665665
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",
666666
privs = {worldedit=true},
@@ -694,7 +694,7 @@ minetest.register_chatcommand("/stretch", {
694694
end),
695695
})
696696

697-
minetest.register_chatcommand("/transpose", {
697+
minetest.register_chatcommand("we-transpose", {
698698
params = "x/y/z/? x/y/z/?",
699699
description = "Transpose the current WorldEdit region along the x/y/z/? and x/y/z/? axes",
700700
privs = {worldedit=true},
@@ -727,7 +727,7 @@ minetest.register_chatcommand("/transpose", {
727727
end),
728728
})
729729

730-
minetest.register_chatcommand("/flip", {
730+
minetest.register_chatcommand("we-flip", {
731731
params = "x/y/z/?",
732732
description = "Flip the current WorldEdit region along the x/y/z/? axis",
733733
privs = {worldedit=true},
@@ -745,7 +745,7 @@ minetest.register_chatcommand("/flip", {
745745
end),
746746
})
747747

748-
minetest.register_chatcommand("/rotate", {
748+
minetest.register_chatcommand("we-rotate", {
749749
params = "<axis> <angle>",
750750
description = "Rotate the current WorldEdit region around the axis <axis> by angle <angle> (90 degree increment)",
751751
privs = {worldedit=true},
@@ -777,7 +777,7 @@ minetest.register_chatcommand("/rotate", {
777777
end),
778778
})
779779

780-
minetest.register_chatcommand("/orient", {
780+
minetest.register_chatcommand("we-orient", {
781781
params = "<angle>",
782782
description = "Rotate oriented nodes in the current WorldEdit region around the Y axis by angle <angle> (90 degree increment)",
783783
privs = {worldedit=true},
@@ -800,7 +800,7 @@ minetest.register_chatcommand("/orient", {
800800
end),
801801
})
802802

803-
minetest.register_chatcommand("/fixlight", {
803+
minetest.register_chatcommand("we-fixlight", {
804804
params = "",
805805
description = "Fix the lighting in the current WorldEdit region",
806806
privs = {worldedit=true},
@@ -810,7 +810,7 @@ minetest.register_chatcommand("/fixlight", {
810810
end),
811811
})
812812

813-
minetest.register_chatcommand("/hide", {
813+
minetest.register_chatcommand("we-hide", {
814814
params = "",
815815
description = "Hide all nodes in the current WorldEdit region non-destructively",
816816
privs = {worldedit=true},
@@ -820,7 +820,7 @@ minetest.register_chatcommand("/hide", {
820820
end),
821821
})
822822

823-
minetest.register_chatcommand("/suppress", {
823+
minetest.register_chatcommand("we-suppress", {
824824
params = "<node>",
825825
description = "Suppress all <node> in the current WorldEdit region non-destructively",
826826
privs = {worldedit=true},
@@ -831,7 +831,7 @@ minetest.register_chatcommand("/suppress", {
831831
end, check_set),
832832
})
833833

834-
minetest.register_chatcommand("/highlight", {
834+
minetest.register_chatcommand("we-highlight", {
835835
params = "<node>",
836836
description = "Highlight <node> in the current WorldEdit region by hiding everything else non-destructively",
837837
privs = {worldedit=true},
@@ -842,7 +842,7 @@ minetest.register_chatcommand("/highlight", {
842842
end, check_set),
843843
})
844844

845-
minetest.register_chatcommand("/restore", {
845+
minetest.register_chatcommand("we-restore", {
846846
params = "",
847847
description = "Restores nodes hidden with WorldEdit in the current WorldEdit region",
848848
privs = {worldedit=true},
@@ -852,7 +852,7 @@ minetest.register_chatcommand("/restore", {
852852
end),
853853
})
854854

855-
minetest.register_chatcommand("/save", {
855+
minetest.register_chatcommand("we-save", {
856856
params = "<file>",
857857
description = "Save the current WorldEdit region to \"(world folder)/schems/<file>.we\"",
858858
privs = {worldedit=true},
@@ -885,7 +885,7 @@ minetest.register_chatcommand("/save", {
885885
end),
886886
})
887887

888-
minetest.register_chatcommand("/allocate", {
888+
minetest.register_chatcommand("we-allocate", {
889889
params = "<file>",
890890
description = "Set the region defined by nodes from \"(world folder)/schems/<file>.we\" as the current WorldEdit region",
891891
privs = {worldedit=true},
@@ -926,7 +926,7 @@ minetest.register_chatcommand("/allocate", {
926926
end,
927927
})
928928

929-
minetest.register_chatcommand("/load", {
929+
minetest.register_chatcommand("we-load", {
930930
params = "<file>",
931931
description = "Load nodes from \"(world folder)/schems/<file>[.we[m]]\" with position 1 of the current WorldEdit region as the origin",
932932
privs = {worldedit=true},
@@ -974,7 +974,7 @@ minetest.register_chatcommand("/load", {
974974
end,
975975
})
976976

977-
minetest.register_chatcommand("/lua", {
977+
minetest.register_chatcommand("we-lua", {
978978
params = "<code>",
979979
description = "Executes <code> as a Lua chunk in the global namespace",
980980
privs = {worldedit=true, server=true},
@@ -993,7 +993,7 @@ minetest.register_chatcommand("/lua", {
993993
end,
994994
})
995995

996-
minetest.register_chatcommand("/luatransform", {
996+
minetest.register_chatcommand("we-luatransform", {
997997
params = "<code>",
998998
description = "Executes <code> as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region",
999999
privs = {worldedit=true, server=true},
@@ -1013,7 +1013,7 @@ minetest.register_chatcommand("/luatransform", {
10131013
end),
10141014
})
10151015

1016-
minetest.register_chatcommand("/mtschemcreate", {
1016+
minetest.register_chatcommand("we-mtschemcreate", {
10171017
params = "<file>",
10181018
description = "Save the current WorldEdit region using the Minetest Schematic format to \"(world folder)/schems/<filename>.mts\"",
10191019
privs = {worldedit=true},
@@ -1038,7 +1038,7 @@ minetest.register_chatcommand("/mtschemcreate", {
10381038
end),
10391039
})
10401040

1041-
minetest.register_chatcommand("/mtschemplace", {
1041+
minetest.register_chatcommand("we-mtschemplace", {
10421042
params = "<file>",
10431043
description = "Load nodes from \"(world folder)/schems/<file>.mts\" with position 1 of the current WorldEdit region as the origin",
10441044
privs = {worldedit=true},
@@ -1061,7 +1061,7 @@ minetest.register_chatcommand("/mtschemplace", {
10611061
end,
10621062
})
10631063

1064-
minetest.register_chatcommand("/mtschemprob", {
1064+
minetest.register_chatcommand("we-mtschemprob", {
10651065
params = "start/finish/get",
10661066
description = "Begins node probability entry for Minetest schematics, gets the nodes that have probabilities set, or ends node probability entry",
10671067
privs = {worldedit=true},
@@ -1102,7 +1102,7 @@ minetest.register_on_player_receive_fields(
11021102
end
11031103
)
11041104

1105-
minetest.register_chatcommand("/clearobjects", {
1105+
minetest.register_chatcommand("we-clearobjects", {
11061106
params = "",
11071107
description = "Clears all objects within the WorldEdit region",
11081108
privs = {worldedit=true},

‎worldedit_commands/safe.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ safe_region = function(callback, nodes_needed)
2626

2727
--save callback to call later
2828
safe_region_callback[name], safe_region_param[name] = callback, param
29-
worldedit.player_notify(name, "WARNING: this operation could affect up to " .. count .. " nodes; type //y to continue or //n to cancel")
29+
worldedit.player_notify(name, "WARNING: this operation could affect up to " .. count .. " nodes; type /we-y to continue or /we-n to cancel")
3030
end
3131
end
3232

33-
minetest.register_chatcommand("/y", {
33+
minetest.register_chatcommand("we-y", {
3434
params = "",
3535
description = "Confirm a pending operation",
3636
func = function(name)
@@ -52,7 +52,7 @@ minetest.register_chatcommand("/y", {
5252
end,
5353
})
5454

55-
minetest.register_chatcommand("/n", {
55+
minetest.register_chatcommand("we-n", {
5656
params = "",
5757
description = "Confirm a pending operation",
5858
func = function(name)

‎worldedit_shortcommands/init.lua

+36-36
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,49 @@
22

33
--returns true if command could not be aliased, false otherwise
44
worldedit.alias_chatcommand = function(alias, original_command)
5-
if not minetest.chatcommands[original_command] then
5+
if not minetest.chatcommands["we-"..original_command] then
66
minetest.log("error", "worldedit_shortcommands: original command " .. original_command .. " does not exist")
77
return true
88
end
99
if minetest.chatcommands[alias] then
1010
minetest.log("error", "worldedit_shortcommands: alias " .. alias .. " already exists")
1111
return true
1212
end
13-
minetest.register_chatcommand(alias, minetest.chatcommands[original_command])
13+
minetest.register_chatcommand(alias, minetest.chatcommands["we-"..original_command])
1414
return false
1515
end
1616

17-
worldedit.alias_chatcommand("/i", "/inspect")
18-
worldedit.alias_chatcommand("/rst", "/reset")
19-
worldedit.alias_chatcommand("/mk", "/mark")
20-
worldedit.alias_chatcommand("/umk", "/unmark")
21-
worldedit.alias_chatcommand("/1", "/pos1")
22-
worldedit.alias_chatcommand("/2", "/pos2")
23-
worldedit.alias_chatcommand("/fp", "/fixedpos")
24-
worldedit.alias_chatcommand("/v", "/volume")
25-
worldedit.alias_chatcommand("/s", "/set")
26-
worldedit.alias_chatcommand("/r", "/replace")
27-
worldedit.alias_chatcommand("/ri", "/replaceinverse")
28-
worldedit.alias_chatcommand("/hspr", "/hollowsphere")
29-
worldedit.alias_chatcommand("/spr", "/sphere")
30-
worldedit.alias_chatcommand("/hdo", "/hollowdome")
31-
worldedit.alias_chatcommand("/do", "/dome")
32-
worldedit.alias_chatcommand("/hcyl", "/hollowcylinder")
33-
worldedit.alias_chatcommand("/cyl", "/cylinder")
34-
worldedit.alias_chatcommand("/pyr", "/pyramid")
35-
worldedit.alias_chatcommand("/spl", "/spiral")
36-
worldedit.alias_chatcommand("/m", "/move")
37-
worldedit.alias_chatcommand("/c", "/copy")
38-
worldedit.alias_chatcommand("/stk", "/stack")
39-
worldedit.alias_chatcommand("/sch", "/stretch")
40-
worldedit.alias_chatcommand("/tps", "/transpose")
41-
worldedit.alias_chatcommand("/fl", "/flip")
42-
worldedit.alias_chatcommand("/rot", "/rotate")
43-
worldedit.alias_chatcommand("/ort", "/orient")
44-
worldedit.alias_chatcommand("/hi", "/hide")
45-
worldedit.alias_chatcommand("/sup", "/suppress")
46-
worldedit.alias_chatcommand("/hlt", "/highlight")
47-
worldedit.alias_chatcommand("/rsr", "/restore")
48-
worldedit.alias_chatcommand("/l", "/lua")
49-
worldedit.alias_chatcommand("/lt", "/luatransform")
50-
worldedit.alias_chatcommand("/clro", "/clearobjects")
17+
worldedit.alias_chatcommand("i", "inspect")
18+
worldedit.alias_chatcommand("rst", "reset")
19+
worldedit.alias_chatcommand("mk", "mark")
20+
worldedit.alias_chatcommand("umk", "unmark")
21+
worldedit.alias_chatcommand("1", "pos1")
22+
worldedit.alias_chatcommand("2", "pos2")
23+
worldedit.alias_chatcommand("fp", "fixedpos")
24+
worldedit.alias_chatcommand("v", "volume")
25+
worldedit.alias_chatcommand("s", "set")
26+
worldedit.alias_chatcommand("r", "replace")
27+
worldedit.alias_chatcommand("ri", "replaceinverse")
28+
worldedit.alias_chatcommand("hspr", "hollowsphere")
29+
worldedit.alias_chatcommand("spr", "sphere")
30+
worldedit.alias_chatcommand("hdo", "hollowdome")
31+
worldedit.alias_chatcommand("do", "dome")
32+
worldedit.alias_chatcommand("hcyl", "hollowcylinder")
33+
worldedit.alias_chatcommand("cyl", "cylinder")
34+
worldedit.alias_chatcommand("pyr", "pyramid")
35+
worldedit.alias_chatcommand("spl", "spiral")
36+
worldedit.alias_chatcommand("m", "move")
37+
worldedit.alias_chatcommand("c", "copy")
38+
worldedit.alias_chatcommand("stk", "stack")
39+
worldedit.alias_chatcommand("sch", "stretch")
40+
worldedit.alias_chatcommand("tps", "transpose")
41+
worldedit.alias_chatcommand("fl", "flip")
42+
worldedit.alias_chatcommand("rot", "rotate")
43+
worldedit.alias_chatcommand("ort", "orient")
44+
worldedit.alias_chatcommand("hi", "hide")
45+
worldedit.alias_chatcommand("sup", "suppress")
46+
worldedit.alias_chatcommand("hlt", "highlight")
47+
worldedit.alias_chatcommand("rsr", "restore")
48+
worldedit.alias_chatcommand("l", "lua")
49+
worldedit.alias_chatcommand("lt", "luatransform")
50+
worldedit.alias_chatcommand("clro", "clearobjects")

0 commit comments

Comments
 (0)
Please sign in to comment.