mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2025-06-28 06:12:00 +02:00
Remove unused variables and assignments
This commit is contained in:
@ -45,14 +45,14 @@ local function chatcommand_handler(cmd_name, name, param)
|
||||
if def.nodes_needed then
|
||||
local count = def.nodes_needed(name, unpack(parsed))
|
||||
safe_region(name, count, function()
|
||||
local success, msg = def.func(name, unpack(parsed))
|
||||
local _, msg = def.func(name, unpack(parsed))
|
||||
if msg then
|
||||
minetest.chat_send_player(name, msg)
|
||||
end
|
||||
end)
|
||||
else
|
||||
-- no "safe region" check
|
||||
local success, msg = def.func(name, unpack(parsed))
|
||||
local _, msg = def.func(name, unpack(parsed))
|
||||
if msg then
|
||||
minetest.chat_send_player(name, msg)
|
||||
end
|
||||
@ -296,7 +296,6 @@ worldedit.register_command("help", {
|
||||
return false, "You are not allowed to use any WorldEdit commands."
|
||||
end
|
||||
if param == "" then
|
||||
local msg = ""
|
||||
local cmds = {}
|
||||
for cmd, def in pairs(worldedit.registered_commands) do
|
||||
if minetest.check_player_privs(name, def.privs) then
|
||||
@ -1383,7 +1382,7 @@ worldedit.register_command("restore", {
|
||||
})
|
||||
|
||||
local function detect_misaligned_schematic(name, pos1, pos2)
|
||||
pos1, pos2 = worldedit.sort_pos(pos1, pos2)
|
||||
pos1 = worldedit.sort_pos(pos1, pos2)
|
||||
-- Check that allocate/save can position the schematic correctly
|
||||
-- The expected behaviour is that the (0,0,0) corner of the schematic stays
|
||||
-- sat pos1, this only works when the minimum position is actually present
|
||||
|
@ -6,7 +6,7 @@ local init_sentinel = "new" .. tostring(math.random(99999))
|
||||
|
||||
--marks worldedit region position 1
|
||||
worldedit.mark_pos1 = function(name, region_too)
|
||||
local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]
|
||||
local pos1 = worldedit.pos1[name]
|
||||
|
||||
if worldedit.marker1[name] ~= nil then --marker already exists
|
||||
worldedit.marker1[name]:remove() --remove marker
|
||||
@ -30,7 +30,7 @@ end
|
||||
|
||||
--marks worldedit region position 2
|
||||
worldedit.mark_pos2 = function(name, region_too)
|
||||
local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]
|
||||
local pos2 = worldedit.pos2[name]
|
||||
|
||||
if worldedit.marker2[name] ~= nil then --marker already exists
|
||||
worldedit.marker2[name]:remove() --remove marker
|
||||
|
Reference in New Issue
Block a user