Skip to content

Commit 3767ea8

Browse files
committedDec 18, 2013
Include WorldEdit GUI in the documentation, improve privilege handling, simplify main dialog.
1 parent 36424e3 commit 3767ea8

File tree

5 files changed

+169
-55
lines changed

5 files changed

+169
-55
lines changed
 

Diff for: ‎README.md

+26-11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ For more information, see the [forum topic](https://forum.minetest.net/viewtopic
88

99
Installing
1010
----------
11+
In order to use the WorldEdit GUI, you must have one of the following mods installed:
12+
13+
* [Unified Inventory](https://forum.minetest.net/viewtopic.php?id=3933) (RECOMMENDED)
14+
* [Inventory++](https://forum.minetest.net/viewtopic.php?id=6204)
15+
16+
Installation of Unified Inventory is highly recommended. If neither of these mods are installed, the WorldEdit GUI will not be available, though the rest of WorldEdit will work fine.
17+
1118
If you are using Windows, consider installing this mod using [MODSTER](https://forum.minetest.net/viewtopic.php?id=6497), a super simple mod installer that will take care of everything for you. If you are using MODSTER, skip directly to step 6 in the instructions below.
1219

1320
There is a nice installation guide over at the [Minetest Wiki](http://wiki.minetest.com/wiki/Installing_mods). Here is a short summary:
@@ -26,24 +33,30 @@ If you are having trouble, try asking for help in the [IRC channel](http://webch
2633

2734
Usage
2835
-----
29-
WorldEdit works primarily through chat commands. Depending on your key bindings, you can invoke chat entry with the "t" key, and open the chat console with the "F10" key.
36+
WorldEdit works primarily through the WorldEdit GUI and chat commands. Depending on your key bindings, you can invoke chat entry with the "t" key, and open the chat console with the "F10" key.
37+
38+
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`.
3039

31-
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`.
40+
Certain functions/commands such as WorldEdit GUI's "Run Lua" (equivalent to the `//lua` 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.
3241

3342
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.
3443

35-
Chat Commands
36-
-------------
37-
WorldEdit is accessed in-game through an interface. By default, the mod distribution includes a chat interface for this purpose. It is documented in the [Chat Commands Reference](Chat Commands.md).
44+
Interface
45+
---------
46+
WorldEdit is accessed in-game in two main ways.
47+
48+
The GUI adds a screen to each player's inventory that gives access to various WorldEdit functions. The [tutorial](Tutorial.md) and the [Chat Commands Reference](Chat Commands.md) may be helpful in learning to use it.
3849

39-
If visual manipulation of nodes is desired, the [WorldEdit GUI](https://forum.minetest.net/viewtopic.php?id=3112) mod provides a simple interface with buttons and text entry fields for this purpose.
50+
The chat interface adds many chat commands that perform various WorldEdit powered tasks. It is documented in the [Chat Commands Reference](Chat Commands.md).
4051

4152
Compatibility
4253
-------------
43-
This mod supports Minetest versions 0.4.8 and newer. Older versions of WorldEdit may work with older versions of Minetest, but are not recommended.
54+
This mod supports Minetest versions 0.4.8 and newer. Older versions of WorldEdit may work with older versions of Minetest, but are not recommended or supported.
4455

4556
WorldEdit works quite well with other mods, and does not have any known mod conflicts.
4657

58+
WorldEdit GUI requires either [Unified Inventory](https://forum.minetest.net/viewtopic.php?id=3933) or [Inventory++](https://forum.minetest.net/viewtopic.php?id=6204) to be installed in order to use it. This is optional but highly recommended.
59+
4760
WorldEdit API
4861
-------------
4962
WorldEdit exposes all significant functionality in a simple Lua interface. Adding WorldEdit to the file "depends.txt" in your mod gives you access to all of the `worldedit` functions. The API is useful for tasks such as high-performance node manipulation, alternative interfaces, and map creation.
@@ -58,11 +71,13 @@ This API is documented in the [WorldEdit API Reference](WorldEdit API.md).
5871

5972
Axes
6073
----
61-
The coordinate system is the same as that used by MineTest; Y is upwards, X is perpendicular, and Z is parallel.
74+
The coordinate system is the same as that used by Minetest; positive Y is upwards, positive X is rightwards, and positive Z is forwards, if a player is facing North (positive Z axis).
75+
76+
When an axis is specified in a WorldEdit chat command, it is specified as one of the following values: `x`, `y`, `z`, or `?`.
6277

63-
When an axis is specified in a WorldEdit command, it is specified as one of the following values: x, y, z, or ?.
78+
In the GUI, there is a dropdown menu for this purpose. The "Look direction" option has the same effect as `?` does in chat commands.
6479

65-
The value ? represents the axis the player is currently facing. If the player is facing more than one axis, the axis the player face direction is closest to will be used.
80+
The value `?` represents the axis the player is currently facing. If the player is facing more than one axis, the axis the player face direction is closest to will be used.
6681

6782
Nodes
6883
-----
@@ -111,7 +126,7 @@ The current version of the WorldEdit Schematic format, internally known as versi
111126
<...>
112127
}
113128

114-
Value ordering and minor aspects of the syntax, such as trailing commas or newlines, are not guaranteed.
129+
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.
115130

116131
The WorldEdit Schematic format is accessed via the WorldEdit API, or WorldEdit serialization chat commands such as `//serialize` and `//deserialize`.
117132

Diff for: ‎Tutorial.md

+69-3
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,51 @@ Let's start with a few assumptions:
99
* You have WorldEdit installed as a mod.
1010
* If using Windows, [MODSTER](https://forum.minetest.net/viewtopic.php?pid=101463) makes installing mods totally painless.
1111
* Simply download the file, extract the archive, and move it to the correct mod folder for Minetest.
12+
* If you want to use the WorldEdit GUI, you have installed either [Unified Inventory](https://forum.minetest.net/viewtopic.php?id=3933) (recommended), or [Inventory++](https://forum.minetest.net/viewtopic.php?id=6204).
13+
* See the installation instructions in [README](README.md) if you need more details.
1214
* You are familiar with the basics of the game.
1315
* How to walk, jump, and climb.
1416
* How to dig, place, and punch blocks.
15-
* How to type into the chat and read text from it.
17+
* One of the following:
18+
* How to type into the chat and read text from it.
19+
* How to open the inventory screen and press buttons on it.
1620

1721
Overview
1822
--------
1923
WorldEdit has a "region", which is simply a cuboid area defined by two markers, both of which the player can move around. Every player can have their own region with their own two markers.
2024

21-
WorldEdit chat commands can work inside the region selected, or around the first marker.
25+
WorldEdit GUI buttons and chat commands generally work inside the region selected, or around the first marker.
26+
27+
If you are using the chat commands, follow the steps under **Chat Commands**. If you are using the WorldEdit GUI, follow the steps under **WorldEdit GUI**.
2228

2329
Step 1: Selecting a region
2430
--------------------------
31+
### Chat Commands
32+
2533
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.
2634

2735
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.
2836

2937
Walk away from the node you just punched. Now, punch another node. A black cube reading "2" will appear around the node. This is the marker for WorldEdit position 2.
3038

39+
### WorldEdit GUI
40+
41+
Open the main WorldEdit GUI from your inventory screen.
42+
43+
Press the "Get/Set Positions" button. On the new screen, press the "Set Position 1" button. The inventory screen should close.
44+
45+
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.
46+
47+
Walk away from the node you just punched. Open your inventory again. It should be on the same page as it was before.
48+
49+
Press the "Set Position 2" button. The inventory screen should close.
50+
51+
Now, punch another node. A black cube reading "2" will appear around the node. This is the marker for WorldEdit position 2.
52+
3153
Step 2: Region commands
3254
-----------------------
55+
### Chat Commands
56+
3357
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.
3458

3559
Look at the place between the two markers: it is now filled with MESE blocks!
@@ -38,18 +62,60 @@ The `//set <node>` command fills the region with whatever node you want. It is a
3862

3963
Now, try a few different variations, such as `//set torch`, `//set cobble`, and `//set water`.
4064

65+
### WorldEdit GUI
66+
67+
Open the main WorldEdit GUI from your inventory screen.
68+
69+
Press the "Set Nodes" button. You should see a new screen with various options for setting nodes.
70+
71+
Enter "mese" in the "Name" field. Press Search if you would like to see what the node you just entered looks like.
72+
73+
Press the "Set Nodes" button on this screen. In the chat, you will see a message showing the number of nodes set after a small delay.
74+
75+
Look at the place between the two markers: it is now filled with MESE blocks!
76+
77+
The "Set Nodes" function fills the region with whatever node you want. It is a region-oriented command, which means it works inside the WorldEdit region only.
78+
79+
Now, try a few different variations on the node name, such as "torch", "cobble", and "water".
80+
4181
Step 3: Position commands
4282
-------------------------
83+
### Chat Commands
84+
4385
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.
4486

4587
Look around marker 1: it is now surrounded by a hollow glass dome!
4688

4789
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.
4890

91+
### WorldEdit GUI
92+
93+
Open the main WorldEdit GUI from your inventory screen.
94+
95+
Press the "Sphere/Dome" button. You should see a new screen with various options for making spheres or domes.
96+
97+
Enter "glass" in the "Name" field. Press Search if you would like to see what the node you just entered looks like.
98+
99+
Enter "30" in the "Radius" field.
100+
101+
Press the "Hollow Dome" button on this screen. In the chat, you will see a message showing the number of nodes added after a small delay.
102+
103+
Look around marker 1: it is now surrounded by a hollow glass dome!
104+
105+
The "Hollow Dome" function 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.
106+
49107
Step 4: Other commands
50108
----------------------
109+
### Chat Commands
110+
51111
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.
52112

53113
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`.
54114

55-
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.
115+
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.
116+
117+
### WorldEdit GUI
118+
119+
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.
120+
121+
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.

Diff for: ‎worldedit_commands/init.lua

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
minetest.register_privilege("worldedit", "Can use WorldEdit commands")
22

3+
--wip: fold the hollow stuff into the main functions and add a hollow flag at the end, then add the compatibility stuff
4+
35
worldedit.set_pos = {}
46
worldedit.inspect = {}
57

Diff for: ‎worldedit_gui/depends.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
worldedit
22
worldedit_commands
3+
unified_inventory?
34
inventory_plus?

Diff for: ‎worldedit_gui/functionality.lua

+71-41
Original file line numberDiff line numberDiff line change
@@ -21,49 +21,62 @@ local axis_values = {"x", "y", "z", "?"}
2121
setmetatable(axis_indices, {__index = function () return 4 end})
2222
setmetatable(axis_values, {__index = function () return "?" end})
2323

24-
local register_gui_chatcommand = function(identifier, name, command, callback)
25-
callback = callback or function(name, command) command(name, "") end
26-
worldedit.register_gui_function(identifier, {
27-
name = name,
28-
privs = minetest.chatcommands[command].privs,
29-
on_select = function(name)
30-
return callback(name, minetest.chatcommands[command].func)
31-
end,
32-
})
24+
--given multiple sets of privileges, produces a single set of privs that would have the same effect as requiring all of them at the same time
25+
local combine_privs = function(...)
26+
local result = {}
27+
for i, privs in ipairs({...}) do
28+
for name, value in pairs(privs) do
29+
if result[name] ~= nil and result[name] ~= value then --the priv must be both true and false, which can never happen
30+
return {__fake_priv_that_nobody_has__=true} --priviledge table that can never be satisfied
31+
end
32+
result[name] = value
33+
end
34+
end
35+
return result
3336
end
3437

35-
register_gui_chatcommand("worldedit_gui_about", "About", "/about")
36-
register_gui_chatcommand("worldedit_gui_inspect", "Toggle Inspection", "/inspect", function(name, command)
37-
command(name, worldedit.inspect[name] and "disable" or "enable")
38-
end)
39-
register_gui_chatcommand("worldedit_gui_reset", "Reset Region", "/reset")
40-
register_gui_chatcommand("worldedit_gui_mark", "Mark Region", "/mark")
41-
register_gui_chatcommand("worldedit_gui_unmark", "Unmark Region", "/unmark")
38+
worldedit.register_gui_function("worldedit_gui_about", {
39+
name = "About", privs = minetest.chatcommands["/about"].privs,
40+
on_select = function(name)
41+
minetest.chatcommands["/about"].func(name, "")
42+
end,
43+
})
44+
45+
worldedit.register_gui_function("worldedit_gui_inspect", {
46+
name = "Toggle Inspect", privs = minetest.chatcommands["/inspect"].privs,
47+
on_select = function(name)
48+
minetest.chatcommands["/inspect"].func(name, worldedit.inspect[name] and "disable" or "enable")
49+
end,
50+
})
4251

43-
worldedit.register_gui_function("worldedit_gui_p", {
44-
name = "Get/Set Positions", privs = minetest.chatcommands["/p"].privs,
52+
worldedit.register_gui_function("worldedit_gui_region", {
53+
name = "Get/Set Region", privs = combine_privs(minetest.chatcommands["/p"].privs, minetest.chatcommands["/pos1"].privs, minetest.chatcommands["/pos2"].privs, minetest.chatcommands["/reset"].privs, minetest.chatcommands["/mark"].privs, minetest.chatcommands["/unmark"].privs, minetest.chatcommands["/volume"].privs, minetest.chatcommands["/fixedpos"].privs),
4554
get_formspec = function(name)
4655
local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]
47-
return "size[9,6]" .. worldedit.get_formspec_header("worldedit_gui_p") ..
56+
return "size[9,7]" .. worldedit.get_formspec_header("worldedit_gui_region") ..
4857
"button_exit[0,1;3,0.8;worldedit_gui_p_get;Get Positions]" ..
4958
"button_exit[3,1;3,0.8;worldedit_gui_p_set1;Choose Position 1]" ..
5059
"button_exit[6,1;3,0.8;worldedit_gui_p_set2;Choose Position 2]" ..
5160
"button_exit[0,2;3,0.8;worldedit_gui_pos1;Position 1 Here]" ..
5261
"button_exit[3,2;3,0.8;worldedit_gui_pos2;Position 2 Here]" ..
53-
"label[0,3.7;Position 1]" ..
54-
string.format("field[2,4;1.5,0.8;worldedit_gui_fixedpos_pos1x;X ;%s]", pos1 and pos1.x or "") ..
55-
string.format("field[3.5,4;1.5,0.8;worldedit_gui_fixedpos_pos1y;Y ;%s]", pos1 and pos1.y or "") ..
56-
string.format("field[5,4;1.5,0.8;worldedit_gui_fixedpos_pos1z;Z ;%s]", pos1 and pos1.z or "") ..
57-
"button_exit[6.5,3.68;2.5,0.8;worldedit_gui_fixed_pos1_submit;Set Position 1]" ..
58-
"label[0,5.2;Position 2]" ..
59-
string.format("field[2,5.5;1.5,0.8;worldedit_gui_fixedpos_pos2x;X ;%s]", pos2 and pos2.x or "") ..
60-
string.format("field[3.5,5.5;1.5,0.8;worldedit_gui_fixedpos_pos2y;Y ;%s]", pos2 and pos2.y or "") ..
61-
string.format("field[5,5.5;1.5,0.8;worldedit_gui_fixedpos_pos2z;Z ;%s]", pos2 and pos2.z or "") ..
62-
"button_exit[6.5,5.18;2.5,0.8;worldedit_gui_fixed_pos2_submit;Set Position 2]"
62+
"button_exit[6,2;3,0.8;worldedit_gui_reset;Reset Region]" ..
63+
"button_exit[0,3;3,0.8;worldedit_gui_mark;Mark Region]" ..
64+
"button_exit[3,3;3,0.8;worldedit_gui_unmark;Unmark Region]" ..
65+
"button_exit[6,3;3,0.8;worldedit_gui_volume;Region Volume]" ..
66+
"label[0,4.7;Position 1]" ..
67+
string.format("field[2,5;1.5,0.8;worldedit_gui_fixedpos_pos1x;X ;%s]", pos1 and pos1.x or "") ..
68+
string.format("field[3.5,5;1.5,0.8;worldedit_gui_fixedpos_pos1y;Y ;%s]", pos1 and pos1.y or "") ..
69+
string.format("field[5,5;1.5,0.8;worldedit_gui_fixedpos_pos1z;Z ;%s]", pos1 and pos1.z or "") ..
70+
"button_exit[6.5,4.68;2.5,0.8;worldedit_gui_fixed_pos1_submit;Set Position 1]" ..
71+
"label[0,6.2;Position 2]" ..
72+
string.format("field[2,6.5;1.5,0.8;worldedit_gui_fixedpos_pos2x;X ;%s]", pos2 and pos2.x or "") ..
73+
string.format("field[3.5,6.5;1.5,0.8;worldedit_gui_fixedpos_pos2y;Y ;%s]", pos2 and pos2.y or "") ..
74+
string.format("field[5,6.5;1.5,0.8;worldedit_gui_fixedpos_pos2z;Z ;%s]", pos2 and pos2.z or "") ..
75+
"button_exit[6.5,6.18;2.5,0.8;worldedit_gui_fixed_pos2_submit;Set Position 2]"
6376
end,
6477
})
6578

66-
worldedit.register_gui_handler("worldedit_gui_p", function(name, fields)
79+
worldedit.register_gui_handler("worldedit_gui_region", function(name, fields)
6780
if fields.worldedit_gui_p_get then
6881
minetest.chatcommands["/p"].func(name, "get")
6982
return true
@@ -75,32 +88,46 @@ worldedit.register_gui_handler("worldedit_gui_p", function(name, fields)
7588
return true
7689
elseif fields.worldedit_gui_pos1 then
7790
minetest.chatcommands["/pos1"].func(name, "")
78-
worldedit.show_page(name, "worldedit_gui_p")
91+
worldedit.show_page(name, "worldedit_gui_region")
7992
return true
8093
elseif fields.worldedit_gui_pos2 then
8194
minetest.chatcommands["/pos2"].func(name, "")
82-
worldedit.show_page(name, "worldedit_gui_p")
95+
worldedit.show_page(name, "worldedit_gui_region")
96+
return true
97+
elseif fields.worldedit_gui_reset then
98+
minetest.chatcommands["/reset"].func(name, "")
99+
worldedit.show_page(name, "worldedit_gui_region")
100+
return true
101+
elseif fields.worldedit_gui_mark then
102+
minetest.chatcommands["/mark"].func(name, "")
103+
worldedit.show_page(name, "worldedit_gui_region")
104+
return true
105+
elseif fields.worldedit_gui_unmark then
106+
minetest.chatcommands["/unmark"].func(name, "")
107+
worldedit.show_page(name, "worldedit_gui_region")
108+
return true
109+
elseif fields.worldedit_gui_volume then
110+
minetest.chatcommands["/volume"].func(name, "")
111+
worldedit.show_page(name, "worldedit_gui_region")
83112
return true
84113
elseif fields.worldedit_gui_fixedpos_pos1_submit then
85114
minetest.chatcommands["/fixedpos"].func(name, string.format("set1 %s %s %s",
86115
tostring(fields.worldedit_gui_fixedpos_pos1x),
87116
tostring(fields.worldedit_gui_fixedpos_pos1y),
88117
tostring(fields.worldedit_gui_fixedpos_pos1z)))
89-
worldedit.show_page(name, "worldedit_gui_p")
118+
worldedit.show_page(name, "worldedit_gui_region")
90119
return true
91120
elseif fields.worldedit_gui_fixedpos_pos2_submit then
92121
minetest.chatcommands["/fixedpos"].func(name, string.format("set2 %s %s %s",
93122
tostring(fields.worldedit_gui_fixedpos_pos2x),
94123
tostring(fields.worldedit_gui_fixedpos_pos2y),
95124
tostring(fields.worldedit_gui_fixedpos_pos2z)))
96-
worldedit.show_page(name, "worldedit_gui_p")
125+
worldedit.show_page(name, "worldedit_gui_region")
97126
return true
98127
end
99128
return false
100129
end)
101130

102-
register_gui_chatcommand("worldedit_gui_volume", "Region Volume", "/volume")
103-
104131
worldedit.register_gui_function("worldedit_gui_set", {
105132
name = "Set Nodes", privs = minetest.chatcommands["/set"].privs,
106133
get_formspec = function(name)
@@ -128,7 +155,7 @@ worldedit.register_gui_handler("worldedit_gui_set", function(name, fields)
128155
end)
129156

130157
worldedit.register_gui_function("worldedit_gui_replace", {
131-
name = "Replace Nodes", privs = minetest.chatcommands["/replace"].privs,
158+
name = "Replace Nodes", privs = combine_privs(minetest.chatcommands["/replace"].privs, minetest.chatcommands["/replaceinverse"].privs),
132159
get_formspec = function(name)
133160
local search, replace = gui_nodename1[name], gui_nodename2[name]
134161
local search_nodename, replace_nodename = worldedit.normalize_nodename(search), worldedit.normalize_nodename(replace)
@@ -163,7 +190,7 @@ worldedit.register_gui_handler("worldedit_gui_replace", function(name, fields)
163190
end)
164191

165192
worldedit.register_gui_function("worldedit_gui_sphere_dome", {
166-
name = "Sphere/Dome", privs = minetest.chatcommands["/sphere"].privs,
193+
name = "Sphere/Dome", privs = combine_privs(minetest.chatcommands["/hollowsphere"].privs, minetest.chatcommands["/sphere"].privs, minetest.chatcommands["/hollowdome"].privs, minetest.chatcommands["/dome"].privs),
167194
get_formspec = function(name)
168195
local node, radius = gui_nodename1[name], gui_distance2[name]
169196
local nodename = worldedit.normalize_nodename(node)
@@ -202,7 +229,7 @@ worldedit.register_gui_handler("worldedit_gui_sphere_dome", function(name, field
202229
end)
203230

204231
worldedit.register_gui_function("worldedit_gui_cylinder", {
205-
name = "Cylinder", privs = minetest.chatcommands["/cylinder"].privs,
232+
name = "Cylinder", privs = combine_privs(minetest.chatcommands["/hollowcylinder"].privs, minetest.chatcommands["/cylinder"].privs),
206233
get_formspec = function(name)
207234
local node, axis, length, radius = gui_nodename1[name], gui_axis[name], gui_distance1[name], gui_distance2[name]
208235
local nodename = worldedit.normalize_nodename(node)
@@ -300,7 +327,7 @@ worldedit.register_gui_handler("worldedit_gui_spiral", function(name, fields)
300327
end)
301328

302329
worldedit.register_gui_function("worldedit_gui_copy_move", {
303-
name = "Copy/Move", privs = minetest.chatcommands["/move"].privs,
330+
name = "Copy/Move", privs = combine_privs(minetest.chatcommands["/copy"].privs, minetest.chatcommands["/move"].privs),
304331
get_formspec = function(name)
305332
local axis = gui_axis[name] or 4
306333
local amount = gui_distance1[name] or "10"
@@ -345,4 +372,7 @@ worldedit.register_gui_handler("worldedit_gui_formspec_tester", function(name, f
345372
return true
346373
end
347374
return false
348-
end)
375+
end)
376+
377+
--wip: those other commands
378+
--wip: Run Lua and Lua Transform

0 commit comments

Comments
 (0)
Please sign in to comment.