1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-07-04 00:51:04 +02:00

copy .privs with .can_edit_volume for a function wrapper

as well as a conditional for good measure.
This commit is contained in:
khonkhortisan
2014-04-18 18:21:08 -07:00
parent 098051d25e
commit bde3281508
2 changed files with 63 additions and 61 deletions

View File

@ -291,7 +291,7 @@ minetest.register_chatcommand("/set", {
privs = {},
func = worldedit.privs(safe_region(function(name, param)
local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]
if worldedit.can_edit_volume(area:iterp(pos1, pos2)) then
if worldedit.can_edit_volume(VoxelArea:iterp(pos1, pos2)) then
local node = get_node(name, param)
local count = worldedit.set(pos1, pos2, node)
worldedit.player_notify(name, count .. " nodes set")