1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-22 23:10:17 +01:00

Remove / replace all print() calls

This commit is contained in:
PilzAdam 2013-11-17 11:55:46 +01:00
parent 5d0795a1a7
commit 51de4236ab
4 changed files with 9 additions and 8 deletions

View File

@ -28,9 +28,10 @@ minetest.after(0, function()
on_put = function(inv, listname, index, stack, player) on_put = function(inv, listname, index, stack, player)
end, end,
on_take = function(inv, listname, index, stack, player) 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 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
end, end,
}) })
@ -47,7 +48,7 @@ minetest.after(0, function()
inv:add_item("main", ItemStack(itemstring)) inv:add_item("main", ItemStack(itemstring))
end end
creative_inventory.creative_inventory_size = #creative_list 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) end)
-- Create the trash field -- Create the trash field

View File

@ -362,7 +362,7 @@ function default.make_nyancat(pos, facedir, length)
elseif facedir == 3 then elseif facedir == 3 then
tailvec.x = -1 tailvec.x = -1
else else
print("default.make_nyancat(): Invalid facedir: "+dump(facedir)) --print("default.make_nyancat(): Invalid facedir: "+dump(facedir))
facedir = 0 facedir = 0
tailvec.z = 1 tailvec.z = 1
end end

View File

@ -638,7 +638,7 @@ minetest.register_node("default:sign_wall", {
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
fields.text = fields.text or "" 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)) "\" to sign at "..minetest.pos_to_string(pos))
meta:set_string("text", fields.text) meta:set_string("text", fields.text)
meta:set_string("infotext", '"'..fields.text..'"') meta:set_string("infotext", '"'..fields.text..'"')
@ -997,7 +997,7 @@ minetest.register_abm({
-- take stuff from "src" list -- take stuff from "src" list
inv:set_stack("src", 1, aftercooked.items[1]) inv:set_stack("src", 1, aftercooked.items[1])
else else
print("Could not insert '"..cooked.item:to_string().."'") --print("Could not insert '"..cooked.item:to_string().."'")
end end
meta:set_string("src_time", 0) meta:set_string("src_time", 0)
end end

View File

@ -1,7 +1,7 @@
minetest.register_on_newplayer(function(player) minetest.register_on_newplayer(function(player)
print("on_newplayer") --print("on_newplayer")
if minetest.setting_getbool("give_initial_stuff") then 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:pick_steel')
player:get_inventory():add_item('main', 'default:torch 99') player:get_inventory():add_item('main', 'default:torch 99')
player:get_inventory():add_item('main', 'default:axe_steel') player:get_inventory():add_item('main', 'default:axe_steel')