Various code fixes

This commit is contained in:
Panquesito7 2020-02-07 21:20:23 -06:00
parent 3fa2b680a4
commit 198cd4b4bc
No known key found for this signature in database
GPG Key ID: 3C482B03FD220E68
2 changed files with 4 additions and 2 deletions

View File

@ -299,6 +299,7 @@ function worldedit.spiral(pos, length, height, spacer, node_name)
for index = 1, segment_length do
-- Move along the direction of the segment
i = i + stride_axis * sign
column = i
-- Add column
for y = 1, height do
data[column] = node_id
@ -313,6 +314,7 @@ function worldedit.spiral(pos, length, height, spacer, node_name)
sign = -sign
for index = 1, segment_length do
i = i + stride_axis * sign
column = i
-- Add column
for y = 1, height do
data[column] = node_id

View File

@ -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 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 msg = def.func(name, unpack(parsed))
local _, msg = def.func(name, unpack(parsed))
if msg then
minetest.chat_send_player(name, msg)
end