From 51de4236ab7c0ffc06d41eb66da2e96739687bf0 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sun, 17 Nov 2013 11:55:46 +0100 Subject: [PATCH] Remove / replace all print() calls --- mods/creative/init.lua | 7 ++++--- mods/default/mapgen.lua | 2 +- mods/default/nodes.lua | 4 ++-- mods/give_initial_stuff/init.lua | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/mods/creative/init.lua b/mods/creative/init.lua index c06dc493..fa26348e 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -28,9 +28,10 @@ minetest.after(0, function() on_put = function(inv, listname, index, stack, player) end, on_take = function(inv, listname, index, stack, player) - print(player:get_player_name().." takes item from creative inventory; listname="..dump(listname)..", index="..dump(index)..", stack="..dump(stack)) + --print(player:get_player_name().." takes item from creative inventory; listname="..dump(listname)..", index="..dump(index)..", stack="..dump(stack)) if stack then - print("stack:get_name()="..dump(stack:get_name())..", stack:get_count()="..dump(stack:get_count())) + minetest.log("action", player:get_player_name().." takes "..dump(stack:get_name()).." from creative inventory") + --print("stack:get_name()="..dump(stack:get_name())..", stack:get_count()="..dump(stack:get_count())) end end, }) @@ -47,7 +48,7 @@ minetest.after(0, function() inv:add_item("main", ItemStack(itemstring)) end creative_inventory.creative_inventory_size = #creative_list - print("creative inventory size: "..dump(creative_inventory.creative_inventory_size)) + --print("creative inventory size: "..dump(creative_inventory.creative_inventory_size)) end) -- Create the trash field diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index afb35e0f..4907cf7b 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -362,7 +362,7 @@ function default.make_nyancat(pos, facedir, length) elseif facedir == 3 then tailvec.x = -1 else - print("default.make_nyancat(): Invalid facedir: "+dump(facedir)) + --print("default.make_nyancat(): Invalid facedir: "+dump(facedir)) facedir = 0 tailvec.z = 1 end diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index ecbd7a81..227a26b7 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -638,7 +638,7 @@ minetest.register_node("default:sign_wall", { --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) local meta = minetest.get_meta(pos) fields.text = fields.text or "" - print((sender:get_player_name() or "").." wrote \""..fields.text.. + minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text.. "\" to sign at "..minetest.pos_to_string(pos)) meta:set_string("text", fields.text) meta:set_string("infotext", '"'..fields.text..'"') @@ -997,7 +997,7 @@ minetest.register_abm({ -- take stuff from "src" list inv:set_stack("src", 1, aftercooked.items[1]) else - print("Could not insert '"..cooked.item:to_string().."'") + --print("Could not insert '"..cooked.item:to_string().."'") end meta:set_string("src_time", 0) end diff --git a/mods/give_initial_stuff/init.lua b/mods/give_initial_stuff/init.lua index 9cf6b51b..c65ddeae 100644 --- a/mods/give_initial_stuff/init.lua +++ b/mods/give_initial_stuff/init.lua @@ -1,7 +1,7 @@ minetest.register_on_newplayer(function(player) - print("on_newplayer") + --print("on_newplayer") if minetest.setting_getbool("give_initial_stuff") then - print("giving give_initial_stuff to player") + minetest.log("action", "Giving initial stuff to player "..player:get_player_name()) player:get_inventory():add_item('main', 'default:pick_steel') player:get_inventory():add_item('main', 'default:torch 99') player:get_inventory():add_item('main', 'default:axe_steel') -- 2.25.1