From f8a6a204f8ca75b5e6398643ecefe7eb7c7dd053 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 15 Jun 2020 13:04:42 +0100 Subject: [PATCH] Tidy up debug messages --- worldeditadditions/utils/raycast_adv.lua | 3 --- worldeditadditions_farwand/lib/chatcommand.lua | 1 - worldeditadditions_farwand/lib/farwand.lua | 14 +++++++------- worldeditadditions_farwand/lib/settings.lua | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/worldeditadditions/utils/raycast_adv.lua b/worldeditadditions/utils/raycast_adv.lua index edbeb91..1b3c394 100644 --- a/worldeditadditions/utils/raycast_adv.lua +++ b/worldeditadditions/utils/raycast_adv.lua @@ -40,11 +40,9 @@ function worldeditadditions.raycast(player, maxdist, skip_liquid) if node ~= nil then local node_id = minetest.get_content_id(node.name) local is_air = worldeditadditions.is_airlike(node_id) - print("[raycast] Scanning "..worldeditadditions.vector.tostring(cur_pos)..", i: "..i..", j: "..j..", found", node.name, "is_air", is_air) -- ignore = unloaded chunks, as far as I can tell if node_id == node_id_ignore then - print("[raycast] found ignore, returning nil") return nil end @@ -53,7 +51,6 @@ function worldeditadditions.raycast(player, maxdist, skip_liquid) return node_pos, node_id else local is_liquid = worldeditadditions.is_liquidlike(node_id) - print("[raycast] is_liquid ", is_liquid) if is_liquid == false then return node_pos, node_id end diff --git a/worldeditadditions_farwand/lib/chatcommand.lua b/worldeditadditions_farwand/lib/chatcommand.lua index 65a8c7b..3ad416b 100644 --- a/worldeditadditions_farwand/lib/chatcommand.lua +++ b/worldeditadditions_farwand/lib/chatcommand.lua @@ -26,7 +26,6 @@ minetest.register_chatcommand("/farwand", { func = function(name, params_text) if name == nil then return end local success, key, value = parse_params_farwand(params_text) - print("[/farwand] ", success, key, value) if success == false then worldedit.player_notify(name, key) return diff --git a/worldeditadditions_farwand/lib/farwand.lua b/worldeditadditions_farwand/lib/farwand.lua index 66fe2c0..943744f 100644 --- a/worldeditadditions_farwand/lib/farwand.lua +++ b/worldeditadditions_farwand/lib/farwand.lua @@ -1,19 +1,19 @@ local function set_pos1(name, pos) if pos ~= nil then - print("[set_pos1]", name, "("..pos.x..", "..pos.y..", "..pos.z..")") + -- print("[set_pos1]", name, "("..pos.x..", "..pos.y..", "..pos.z..")") worldedit.pos1[name] = pos worldedit.mark_pos1(name) else - print("[set_pos1]", name, "nil") + -- print("[set_pos1]", name, "nil") end end local function set_pos2(name, pos) if pos ~= nil then - print("[set_pos2]", name, "("..pos.x..", "..pos.y..", "..pos.z..")") + -- print("[set_pos2]", name, "("..pos.x..", "..pos.y..", "..pos.z..")") worldedit.pos2[name] = pos worldedit.mark_pos2(name) else - print("[set_pos2]", name, "nil") + -- print("[set_pos2]", name, "nil") end end @@ -39,7 +39,7 @@ minetest.register_tool(":worldeditadditions:farwand", { on_place = function(itemstack, player, pointed_thing) local name = player:get_player_name() - print("[farwand] on_place", name) + -- print("[farwand] on_place", name) -- Right click when pointing at something -- Pointed thing: https://rubenwardy.com/minetest_modding_book/lua_api.html#pointed_thing local looking_pos, node_id = do_raycast(player) @@ -48,7 +48,7 @@ minetest.register_tool(":worldeditadditions:farwand", { on_use = function(itemstack, player, pointed_thing) local name = player:get_player_name() - print("[farwand] on_use", name) + -- print("[farwand] on_use", name) local looking_pos, node_id = do_raycast(player) set_pos1(name, looking_pos) -- Left click when pointing at something or nothing @@ -57,7 +57,7 @@ minetest.register_tool(":worldeditadditions:farwand", { on_secondary_use = function(itemstack, player, pointed_thing) local name = player:get_player_name() -- Right click when pointing at nothing - print("[farwand] on_secondary_use", name) + -- print("[farwand] on_secondary_use", name) local looking_pos, node_id = do_raycast(player) set_pos2(name, looking_pos) diff --git a/worldeditadditions_farwand/lib/settings.lua b/worldeditadditions_farwand/lib/settings.lua index 1e89a48..8e1cddb 100644 --- a/worldeditadditions_farwand/lib/settings.lua +++ b/worldeditadditions_farwand/lib/settings.lua @@ -2,7 +2,7 @@ -- @param name The name of the player to ensure has a settings object. local function settings_init(name) if worldeditadditions.farwand.player_data[name] == nil then - print("[settings_init] ", worldeditadditions.farwand.player_data) + minetest.log("INFO", "Initialising settings for "..name) worldeditadditions.farwand.player_data[name] = { maxdist = 1000, skip_liquid = true