mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-22 19:45:02 +00:00
comment all the debug prints
This commit is contained in:
parent
f998110303
commit
7a14e8a590
6 changed files with 8 additions and 10 deletions
|
@ -15,8 +15,8 @@ function worldeditadditions.ellipsoid2(pos1, pos2, target_node, hollow)
|
|||
|
||||
local radius = (pos2 - pos1) / 2
|
||||
|
||||
print("DEBUG:ellipsoid2 | pos1: "..pos1..", pos2: "..pos2..", target_node: "..target_node)
|
||||
print("DEBUG:ellipsoid2 radius", radius)
|
||||
-- print("DEBUG:ellipsoid2 | pos1: "..pos1..", pos2: "..pos2..", target_node: "..target_node)
|
||||
-- print("DEBUG:ellipsoid2 radius", radius)
|
||||
|
||||
-- position = { x, y, z }
|
||||
local hollow_inner_radius = radius - 1
|
||||
|
@ -35,7 +35,7 @@ function worldeditadditions.ellipsoid2(pos1, pos2, target_node, hollow)
|
|||
local here = Vector3.new(x, y, z)
|
||||
local pos_relative = (here - pos1) - volume_half
|
||||
|
||||
print("DEBUG pos1", pos1, "pos2", pos2, "volume_half", volume_half, "pos_relative", pos_relative)
|
||||
-- print("DEBUG pos1", pos1, "pos2", pos2, "volume_half", volume_half, "pos_relative", pos_relative)
|
||||
|
||||
-- If we're inside the ellipse, then fill it in
|
||||
local comp = pos_relative / radius
|
||||
|
|
|
@ -31,7 +31,7 @@ function worldeditadditions.noiseapply2d(pos1, pos2, threshold, scale, func)
|
|||
local data_after = manip_after:get_data()
|
||||
|
||||
local size2d = pos2 - pos1 + Vector3.new(1, 1, 1)
|
||||
print("DEBUG pos1", pos1, "pos2", pos2, "size2d", size2d)
|
||||
-- print("DEBUG pos1", pos1, "pos2", pos2, "size2d", size2d)
|
||||
local success, noise = worldeditadditions.noise.make_2d(size2d, pos1, {
|
||||
algorithm = "perlinmt",
|
||||
scale = scale
|
||||
|
|
|
@ -28,7 +28,7 @@ function worldeditadditions.spiral_circle(pos1, pos2, target_node, interval_init
|
|||
local volume = pos2:subtract(pos1)
|
||||
local volume_half = volume:divide(2)
|
||||
|
||||
print("DEBUG:spiral_square | pos1", pos1, "pos2", pos2, "target_node", target_node, "interval_initial:", interval_initial, "acceleration", acceleration)
|
||||
-- print("DEBUG:spiral_square | pos1", pos1, "pos2", pos2, "target_node", target_node, "interval_initial:", interval_initial, "acceleration", acceleration)
|
||||
|
||||
interval_initial = interval_initial + 1
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ function worldeditadditions.spiral_square(pos1, pos2, target_node, interval, acc
|
|||
local volume = pos2:subtract(pos1)
|
||||
local volume_half = volume:divide(2)
|
||||
|
||||
print("DEBUG:spiral_square | pos1: "..pos1..", pos2: "..pos2..", target_node: "..target_node, "interval:"..interval..", acceleration: "..acceleration)
|
||||
-- print("DEBUG:spiral_square | pos1: "..pos1..", pos2: "..pos2..", target_node: "..target_node, "interval:"..interval..", acceleration: "..acceleration)
|
||||
|
||||
|
||||
-- Fetch the nodes in the specified area
|
||||
|
|
|
@ -91,7 +91,7 @@ local function set_number(entity, display_number)
|
|||
local number_left = (display_number - number_right) / 10
|
||||
texture_name = texture_name.."worldeditadditions_l"..number_left..".png"
|
||||
texture_name = texture_name.."^worldeditadditions_r"..number_right..".png"
|
||||
print("DEBUG:set_number number_left", number_left, "number_right", number_right)
|
||||
-- print("DEBUG:set_number number_left", number_left, "number_right", number_right)
|
||||
|
||||
local colour_id = ((display_number - 1) % 12) + 1 -- Lua starts from 1, not 0 :-/
|
||||
texture_name = "("..texture_name..")^[colorize:"..number_colours[colour_id]..":255"
|
||||
|
@ -102,7 +102,7 @@ local function set_number(entity, display_number)
|
|||
texture_name = "worldeditadditions_bg.png"
|
||||
end
|
||||
|
||||
print("DEBUG:set_number texture_name", texture_name)
|
||||
-- print("DEBUG:set_number texture_name", texture_name)
|
||||
|
||||
entity:set_properties({
|
||||
textures = {
|
||||
|
|
|
@ -60,7 +60,6 @@ end
|
|||
-- @param i number The index of the position to set.
|
||||
-- @returns Vector3? The position to set.
|
||||
local function compat_worldedit_set(player_name, i, pos)
|
||||
print("DEBUG:compat_worldedit_set i", i, "pos", pos)
|
||||
if not worldedit then return end
|
||||
if i == 1 and worldedit.pos1 then
|
||||
worldedit.pos1[player_name] = nil
|
||||
|
@ -223,7 +222,6 @@ end
|
|||
local function push_pos(player_name, pos)
|
||||
ensure_player(player_name)
|
||||
table.insert(positions[player_name], pos)
|
||||
print("DEBUG poslist", wea_c.inspect(positions[player_name]))
|
||||
compat_worldedit_set(player_name, #positions[player_name], pos)
|
||||
|
||||
anchor:emit("push", { player_name = player_name, pos = pos, i = #positions[player_name] })
|
||||
|
|
Loading…
Reference in a new issue