mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-04 21:33:43 +01:00
Make //clearobjects remove unknown objects (#244)
This commit is contained in:
parent
575bfca67a
commit
f75700ed76
@ -644,7 +644,7 @@ function worldedit.clear_objects(pos1, pos2)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local entity = obj:get_luaentity()
|
local entity = obj:get_luaentity()
|
||||||
return not entity or not entity.name:find("^worldedit:")
|
return not (entity and entity.name:find("^worldedit:"))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Offset positions to include full nodes (positions are in the center of nodes)
|
-- Offset positions to include full nodes (positions are in the center of nodes)
|
||||||
@ -691,4 +691,3 @@ function worldedit.clear_objects(pos1, pos2)
|
|||||||
end
|
end
|
||||||
return count
|
return count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user