Fix of all warning when you launch new world

This commit is contained in:
davedevils 2015-07-01 08:24:45 +02:00
parent 21f6253587
commit c6c2607e23
5 changed files with 12 additions and 11 deletions

View file

@ -1,4 +1,4 @@
worldedit = worldedit or {}
worldedit = {}
worldedit.version = {major=1, minor=0}
worldedit.version_string = "1.0"

View file

@ -14,6 +14,7 @@ end
dofile(minetest.get_modpath("worldedit_commands") .. "/mark.lua")
dofile(minetest.get_modpath("worldedit_commands") .. "/safe.lua")
safe_region = safe_region or function(callback) return callback end
local get_position = function(name) --position 1 retrieval function for when not using `safe_region`
local pos1 = worldedit.pos1[name]
@ -858,7 +859,7 @@ minetest.register_chatcommand("/suppress", {
local node = get_node(name, param)
local count = worldedit.suppress(worldedit.pos1[name], worldedit.pos2[name], node)
worldedit.player_notify(name, count .. " nodes suppressed")
end, check_set),
end, check_region),
})
minetest.register_chatcommand("/highlight", {
@ -869,7 +870,7 @@ minetest.register_chatcommand("/highlight", {
local node = get_node(name, param)
local count = worldedit.highlight(worldedit.pos1[name], worldedit.pos2[name], node)
worldedit.player_notify(name, count .. " nodes highlighted")
end, check_set),
end, check_region),
})
minetest.register_chatcommand("/restore", {

View file

@ -1,4 +1,4 @@
worldedit = worldedit or {}
local worldedit = {}
local minetest = minetest --local copy of global
local get_pointed = function(pos, nearest, distance)
@ -100,4 +100,4 @@ worldedit.raytrace = function(pos, dir, callback)
intersectz = intersectz + componentz
end
end
end
end