File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 6161
6262minetest .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
7878minetest .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
You can’t perform that action at this time.
0 commit comments