forked from mtcontrib/Minetest-WorldEdit
Fix some warnings.
This commit is contained in:
parent
4799068551
commit
7f580611f5
@ -199,7 +199,7 @@ worldedit.allocate_with_nodes = function(origin_pos, nodes)
|
|||||||
local pos2x, pos2y, pos2z = -huge, -huge, -huge
|
local pos2x, pos2y, pos2z = -huge, -huge, -huge
|
||||||
local origin_x, origin_y, origin_z = origin_pos.x, origin_pos.y, origin_pos.z
|
local origin_x, origin_y, origin_z = origin_pos.x, origin_pos.y, origin_pos.z
|
||||||
for i, entry in ipairs(nodes) do
|
for i, entry in ipairs(nodes) do
|
||||||
x, y, z = origin_x + entry.x, origin_y + entry.y, origin_z + entry.z
|
local x, y, z = origin_x + entry.x, origin_y + entry.y, origin_z + entry.z
|
||||||
if x < pos1x then pos1x = x end
|
if x < pos1x then pos1x = x end
|
||||||
if y < pos1y then pos1y = y end
|
if y < pos1y then pos1y = y end
|
||||||
if z < pos1z then pos1z = z end
|
if z < pos1z then pos1z = z end
|
||||||
|
@ -13,7 +13,7 @@ if minetest.place_schematic then
|
|||||||
end
|
end
|
||||||
|
|
||||||
dofile(minetest.get_modpath("worldedit_commands") .. "/mark.lua")
|
dofile(minetest.get_modpath("worldedit_commands") .. "/mark.lua")
|
||||||
dofile(minetest.get_modpath("worldedit_commands") .. "/safe.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 get_position = function(name) --position 1 retrieval function for when not using `safe_region`
|
||||||
local pos1 = worldedit.pos1[name]
|
local pos1 = worldedit.pos1[name]
|
||||||
@ -828,7 +828,7 @@ minetest.register_chatcommand("/suppress", {
|
|||||||
local node = get_node(name, param)
|
local node = get_node(name, param)
|
||||||
local count = worldedit.suppress(worldedit.pos1[name], worldedit.pos2[name], node)
|
local count = worldedit.suppress(worldedit.pos1[name], worldedit.pos2[name], node)
|
||||||
worldedit.player_notify(name, count .. " nodes suppressed")
|
worldedit.player_notify(name, count .. " nodes suppressed")
|
||||||
end, check_set),
|
end, check_region),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("/highlight", {
|
minetest.register_chatcommand("/highlight", {
|
||||||
@ -839,7 +839,7 @@ minetest.register_chatcommand("/highlight", {
|
|||||||
local node = get_node(name, param)
|
local node = get_node(name, param)
|
||||||
local count = worldedit.highlight(worldedit.pos1[name], worldedit.pos2[name], node)
|
local count = worldedit.highlight(worldedit.pos1[name], worldedit.pos2[name], node)
|
||||||
worldedit.player_notify(name, count .. " nodes highlighted")
|
worldedit.player_notify(name, count .. " nodes highlighted")
|
||||||
end, check_set),
|
end, check_region),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("/restore", {
|
minetest.register_chatcommand("/restore", {
|
||||||
|
Loading…
Reference in New Issue
Block a user