mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 07:23:00 +00:00
strip remaining worldeditadditions.vector.tostring calls
This commit is contained in:
parent
8ec118eed7
commit
5ec877f2b7
6 changed files with 14 additions and 13 deletions
|
@ -144,11 +144,11 @@ function worldeditadditions.maze2d(pos1, pos2, target_node, seed, path_length, p
|
|||
local node_id_air = minetest.get_content_id("air")
|
||||
local node_id_target = minetest.get_content_id(target_node)
|
||||
|
||||
-- print("pos1: ", worldeditadditions.vector.tostring(pos1))
|
||||
-- print("pos2: ", worldeditadditions.vector.tostring(pos2))
|
||||
-- print("pos1: ", pos1)
|
||||
-- print("pos2: ", pos2)
|
||||
|
||||
|
||||
-- minetest.log("action", "Generating "..extent.x.."x"..extent.z.." maze (depth "..extent.z..") from pos1 " .. worldeditadditions.vector.tostring(pos1).." to pos2 "..worldeditadditions.vector.tostring(pos2))
|
||||
-- minetest.log("action", "Generating "..extent.x.."x"..extent.z.." maze (depth "..extent.z..") from pos1 " .. pos1.." to pos2 "..pos2)
|
||||
-- print("path_width: "..path_width..", path_length: "..path_length)
|
||||
|
||||
local maze = generate_maze(seed, extent.z, extent.x, path_length, path_width) -- x & need to be the opposite way around to how we index it
|
||||
|
|
|
@ -192,11 +192,11 @@ function worldeditadditions.maze3d(pos1, pos2, target_node, seed, path_length, p
|
|||
local node_id_air = minetest.get_content_id("air")
|
||||
local node_id_target = minetest.get_content_id(target_node)
|
||||
|
||||
-- minetest.log("action", "pos1: " .. worldeditadditions.vector.tostring(pos1))
|
||||
-- minetest.log("action", "pos2: " .. worldeditadditions.vector.tostring(pos2))
|
||||
-- minetest.log("action", "pos1: " .. pos1)
|
||||
-- minetest.log("action", "pos2: " .. pos2)
|
||||
|
||||
|
||||
-- minetest.log("action", "Generating "..extent.x.."x"..extent.z.."x"..extent.z.." 3d maze from pos1 " .. worldeditadditions.vector.tostring(pos1).." to pos2 "..worldeditadditions.vector.tostring(pos2))
|
||||
-- minetest.log("action", "Generating "..extent.x.."x"..extent.z.."x"..extent.z.." 3d maze from pos1 " .. pos1.." to pos2 "..pos2)
|
||||
|
||||
local maze = generate_maze3d(seed, extent.z, extent.y, extent.x, path_length, path_width, path_depth) -- x & z need to be the opposite way around to how we index it
|
||||
-- printspace3d(maze, extent.z, extent.y, extent.x)
|
||||
|
|
|
@ -16,8 +16,8 @@ function worldeditadditions.overlay(pos1, pos2, node_weights)
|
|||
|
||||
local node_ids, node_ids_count = wea_c.make_weighted(node_weights)
|
||||
|
||||
-- minetest.log("action", "pos1: " .. worldeditadditions.vector.tostring(pos1))
|
||||
-- minetest.log("action", "pos2: " .. worldeditadditions.vector.tostring(pos2))
|
||||
-- minetest.log("action", "pos1: " .. pos1)
|
||||
-- minetest.log("action", "pos2: " .. pos2)
|
||||
|
||||
-- z y x is the preferred loop order, but that isn't really possible here
|
||||
|
||||
|
|
|
@ -100,8 +100,9 @@ worldeditadditions_core.register_command("hollowtorus", {
|
|||
end,
|
||||
func = function(name, target_node, major_radius, minor_radius, axes)
|
||||
local start_time = worldeditadditions.get_ms_time()
|
||||
local pos1 = Vector3.clone(worldedit.pos1[name])
|
||||
local replaced = worldeditadditions.torus(
|
||||
worldedit.pos1[name],
|
||||
pos1,
|
||||
major_radius, minor_radius,
|
||||
target_node,
|
||||
axes,
|
||||
|
@ -109,7 +110,7 @@ worldeditadditions_core.register_command("hollowtorus", {
|
|||
)
|
||||
local time_taken = worldeditadditions.get_ms_time() - start_time
|
||||
|
||||
minetest.log("action", name .. " used //hollowtorus at " .. worldeditadditions.vector.tostring(worldedit.pos1[name]) .. ", replacing " .. replaced .. " nodes in " .. time_taken .. "s")
|
||||
minetest.log("action", name .. " used //hollowtorus at "..pos1..", replacing " .. replaced .. " nodes in " .. time_taken .. "s")
|
||||
return true, replaced .. " nodes replaced in " .. worldeditadditions.format.human_time(time_taken)
|
||||
end
|
||||
})
|
||||
|
|
|
@ -3,7 +3,7 @@ local function set_pos1(name, pos)
|
|||
-- print("[set_pos1]", name, "("..pos.x..", "..pos.y..", "..pos.z..")")
|
||||
worldedit.pos1[name] = pos
|
||||
worldedit.mark_pos1(name)
|
||||
worldedit.player_notify(name, "pos1 set to "..worldeditadditions.vector.tostring(pos))
|
||||
worldedit.player_notify(name, "pos1 set to "..pos) -- pos is a Vector3
|
||||
else
|
||||
worldedit.player_notify(name, "Error: Too far away (try raising your maxdist with //farwand maxdist <number>)")
|
||||
-- print("[set_pos1]", name, "nil")
|
||||
|
@ -14,7 +14,7 @@ local function set_pos2(name, pos)
|
|||
-- print("[set_pos2]", name, "("..pos.x..", "..pos.y..", "..pos.z..")")
|
||||
worldedit.pos2[name] = pos
|
||||
worldedit.mark_pos2(name)
|
||||
worldedit.player_notify(name, "pos2 set to "..worldeditadditions.vector.tostring(pos))
|
||||
worldedit.player_notify(name, "pos2 set to "..pos)
|
||||
else
|
||||
worldedit.player_notify(name, "Error: Too far away (try raising your maxdist with //farwand maxdist <number>)")
|
||||
-- print("[set_pos2]", name, "nil")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
local wea_c = worldeditadditions_core
|
||||
local wea = worldeditadditions
|
||||
local Vector3 = wea.Vector3
|
||||
local Vector3 = wea_c.Vector3
|
||||
|
||||
local function push_pos(player_name, pos)
|
||||
if player_name == nil then return end
|
||||
|
|
Loading…
Reference in a new issue