mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2025-07-03 16:40:38 +02:00
Various code fixes
This commit is contained in:
@ -299,6 +299,7 @@ function worldedit.spiral(pos, length, height, spacer, node_name)
|
|||||||
for index = 1, segment_length do
|
for index = 1, segment_length do
|
||||||
-- Move along the direction of the segment
|
-- Move along the direction of the segment
|
||||||
i = i + stride_axis * sign
|
i = i + stride_axis * sign
|
||||||
|
column = i
|
||||||
-- Add column
|
-- Add column
|
||||||
for y = 1, height do
|
for y = 1, height do
|
||||||
data[column] = node_id
|
data[column] = node_id
|
||||||
@ -313,6 +314,7 @@ function worldedit.spiral(pos, length, height, spacer, node_name)
|
|||||||
sign = -sign
|
sign = -sign
|
||||||
for index = 1, segment_length do
|
for index = 1, segment_length do
|
||||||
i = i + stride_axis * sign
|
i = i + stride_axis * sign
|
||||||
|
column = i
|
||||||
-- Add column
|
-- Add column
|
||||||
for y = 1, height do
|
for y = 1, height do
|
||||||
data[column] = node_id
|
data[column] = node_id
|
||||||
|
@ -45,14 +45,14 @@ local function chatcommand_handler(cmd_name, name, param)
|
|||||||
if def.nodes_needed then
|
if def.nodes_needed then
|
||||||
local count = def.nodes_needed(name, unpack(parsed))
|
local count = def.nodes_needed(name, unpack(parsed))
|
||||||
safe_region(name, count, function()
|
safe_region(name, count, function()
|
||||||
local msg = def.func(name, unpack(parsed))
|
local _, msg = def.func(name, unpack(parsed))
|
||||||
if msg then
|
if msg then
|
||||||
minetest.chat_send_player(name, msg)
|
minetest.chat_send_player(name, msg)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
-- no "safe region" check
|
-- no "safe region" check
|
||||||
local msg = def.func(name, unpack(parsed))
|
local _, msg = def.func(name, unpack(parsed))
|
||||||
if msg then
|
if msg then
|
||||||
minetest.chat_send_player(name, msg)
|
minetest.chat_send_player(name, msg)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user