Change from print to minetest.log

in minetest 5.3.0 print shows in chat, which is bad for obvious reasons
This commit is contained in:
Elkien3 2020-06-07 11:54:06 -05:00
parent 42c2f5cfe6
commit e626a4f4be

View File

@ -5,8 +5,8 @@ minetest.register_globalstep(function(dtime)
if minetest.localplayer and not player then if minetest.localplayer and not player then
player = minetest.localplayer player = minetest.localplayer
serverinfo = minetest.get_server_info() serverinfo = minetest.get_server_info()
print("mumble id "..player:get_name()) minetest.log("action", "mumble id "..player:get_name())
print("mumble context "..serverinfo.ip..":"..serverinfo.port) minetest.log("action", "mumble context "..serverinfo.ip..":"..serverinfo.port)
minetest.display_chat_message("!Mumble loaded! This mod uses print() to send ingame positional data, so your debug.txt may get quite large, and it's recommended to set debug_log_level to nothing if you haven't already.") minetest.display_chat_message("!Mumble loaded! This mod uses print() to send ingame positional data, so your debug.txt may get quite large, and it's recommended to set debug_log_level to nothing if you haven't already.")
end end
if player then if player then
@ -22,10 +22,10 @@ minetest.register_globalstep(function(dtime)
camera_look = minetest.camera:get_look_dir() camera_look = minetest.camera:get_look_dir()
player_look = camera_look player_look = camera_look
end end
print("p p ["..(player_pos.x).." "..(player_pos.y).." "..(player_pos.z).."]") minetest.log("action", "p p ["..(player_pos.x).." "..(player_pos.y).." "..(player_pos.z).."]")
print("p l ["..(player_look.x).." "..(player_look.y).." "..(player_look.z).."]") minetest.log("action", "p l ["..(player_look.x).." "..(player_look.y).." "..(player_look.z).."]")
print("c p ["..(camera_pos.x).." "..(camera_pos.y).." "..(camera_pos.z).."]") minetest.log("action", "c p ["..(camera_pos.x).." "..(camera_pos.y).." "..(camera_pos.z).."]")
print("c l ["..(camera_look.x).." "..(camera_look.y).." "..(camera_look.z).."]") minetest.log("action", "c l ["..(camera_look.x).." "..(camera_look.y).." "..(camera_look.z).."]")
print("mumble submit") minetest.log("action", "mumble submit")
end end
end) end)