//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)
-- pos2 will always have the highest co-ordinates now
print("SET mode", mode, "value", value)
local setvalue = value
if mode == "param" and type(setvalue) == "string" then
setvalue = minetest.get_content_id(setvalue)
print("SET TRANSFORM setvalue TO", setvalue)
end
print("SET setvalue", setvalue)
-- Initialise statistics
local stats = { changed = 0 }

View file

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