mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-25 10:10:41 +01:00
Fix invalid node error message of //set and //mix
This commit is contained in:
parent
35ad2f031d
commit
283f47f10d
@ -398,10 +398,7 @@ minetest.register_chatcommand("/set", {
|
|||||||
privs = {worldedit=true},
|
privs = {worldedit=true},
|
||||||
func = safe_region(function(name, param)
|
func = safe_region(function(name, param)
|
||||||
local node = get_node(name, param)
|
local node = get_node(name, param)
|
||||||
if not node then
|
if not node then return end
|
||||||
worldedit.player_notify(name, "Could not identify node \"" .. param .. "\"")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local count = worldedit.set(worldedit.pos1[name], worldedit.pos2[name], node)
|
local count = worldedit.set(worldedit.pos1[name], worldedit.pos2[name], node)
|
||||||
worldedit.player_notify(name, count .. " nodes set")
|
worldedit.player_notify(name, count .. " nodes set")
|
||||||
@ -435,10 +432,7 @@ minetest.register_chatcommand("/mix", {
|
|||||||
local nodes = {}
|
local nodes = {}
|
||||||
for nodename in param:gmatch("[^%s]+") do
|
for nodename in param:gmatch("[^%s]+") do
|
||||||
local node = get_node(name, nodename)
|
local node = get_node(name, nodename)
|
||||||
if not node then
|
if not node then return end
|
||||||
worldedit.player_notify(name, "Could not identify node \"" .. name .. "\"")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
nodes[#nodes + 1] = node
|
nodes[#nodes + 1] = node
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user