//set+: remove debug logging

This commit is contained in:
Starbeamrainbowlabs 2024-05-25 15:25:29 +01:00
parent 4728dad02a
commit 34e8f53de6
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 7 additions and 19 deletions

View file

@ -30,16 +30,11 @@ function worldeditadditions.set(pos1, pos2, mode, value)
pos1, pos2 = Vector3.sort(pos1, pos2) pos1, pos2 = Vector3.sort(pos1, pos2)
-- pos2 will always have the highest co-ordinates now -- pos2 will always have the highest co-ordinates now
print("SET mode", mode, "value", value)
local setvalue = value local setvalue = value
if mode == "param" and type(setvalue) == "string" then if mode == "param" and type(setvalue) == "string" then
setvalue = minetest.get_content_id(setvalue) setvalue = minetest.get_content_id(setvalue)
print("SET TRANSFORM setvalue TO", setvalue)
end end
print("SET setvalue", setvalue)
-- Initialise statistics -- Initialise statistics
local stats = { changed = 0 } local stats = { changed = 0 }

View file

@ -2,11 +2,11 @@ local wea = worldeditadditions
local core = worldeditadditions_core local core = worldeditadditions_core
local Vector3 = core.Vector3 local Vector3 = core.Vector3
-- ███████ ███████ ████████ -- ███████ ███████ ████████
-- ██ ██ ██ █ -- ██ ██ ██ █
-- ███████ █████ ██ ████████ -- ███████ █████ ██ █████
-- ██ ██ ██ █ -- ██ ██ ██ █
-- ███████ ███████ ██ -- ███████ ███████ ██
core.register_command("set+", { core.register_command("set+", {
params = params =
"[param|param2|p2|light|l] <value>", "[param|param2|p2|light|l] <value>",
@ -20,7 +20,6 @@ core.register_command("set+", {
end end
local parts = core.split_shell(params_text) local parts = core.split_shell(params_text)
print("parts", core.inspect(parts))
local mode = "param" local mode = "param"
local value = nil local value = nil
@ -33,9 +32,6 @@ core.register_command("set+", {
end end
value = table.concat(parts, " ") value = table.concat(parts, " ")
print("mode", core.inspect(mode))
print("value", core.inspect(value))
-- Normalise mode -- Normalise mode
if mode == "p" then mode = "param" if mode == "p" then mode = "param"
elseif mode == "p2" then mode = "param2" elseif mode == "p2" then mode = "param2"
@ -52,9 +48,6 @@ core.register_command("set+", {
value = math.floor(value) value = math.floor(value)
end end
print("AFTER mode", core.inspect(mode))
print("AFTER value", core.inspect(value))
return true, mode, value return true, mode, value
end, end,
nodes_needed = function(name) -- target_node, target_node_chance, replace_nodes nodes_needed = function(name) -- target_node, target_node_chance, replace_nodes