Skip to content

Commit 8b329c4

Browse files
committed
Minor merge fixes
1 parent 3390774 commit 8b329c4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

worldedit_brush/init.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ local brush_on_use = function(itemstack, placer)
1919
return false
2020
end
2121

22-
local cmddef = minetest.registered_chatcommands["/" .. cmd]
22+
local cmddef = worldedit.registered_commands[cmd]
2323
if cmddef == nil then return false end -- shouldn't happen as //brush checks this
2424

2525
local has_privs, missing_privs = minetest.check_player_privs(name, cmddef.privs)
@@ -51,9 +51,13 @@ local brush_on_use = function(itemstack, placer)
5151
return player_notify_old(name, msg)
5252
end
5353

54+
assert(cmddef.require_pos < 2)
55+
local parsed = {cmddef.parse(meta:get_string("params"))}
56+
if not table.remove(parsed, 1) then return false end -- shouldn't happen
57+
5458
minetest.log("action", string.format("%s uses WorldEdit brush (//%s) at %s",
5559
name, cmd, minetest.pos_to_string(pointed_thing.under)))
56-
cmddef.func(name, meta:get_string("params"))
60+
cmddef.func(name, unpack(parsed))
5761

5862
worldedit.player_notify = player_notify_old
5963
return true

worldedit_commands/safe.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ end)
6161

6262
minetest.register_chatcommand("/y", {
6363
params = "",
64-
description = "Confirm a pending operation",
64+
description = S("Confirm a pending operation"),
6565
privs = {worldedit=true},
6666
func = function(name)
6767
local callback = safe_region_callback[name]
@@ -77,7 +77,7 @@ minetest.register_chatcommand("/y", {
7777

7878
minetest.register_chatcommand("/n", {
7979
params = "",
80-
description = "Abort a pending operation",
80+
description = S("Abort a pending operation"),
8181
privs = {worldedit=true},
8282
func = function(name)
8383
if not safe_region_callback[name] then

0 commit comments

Comments
 (0)