Refactoring and code style fixes in preparation of adding mesh typed items
[oweals/minetest.git] / builtin / init.lua
index 02fb9db93674a155fb22602b264869d4065bf648..b3004468e5efd5ce853d6f942181ba5ccd9d516c 100644 (file)
@@ -7,6 +7,15 @@
 
 -- Initialize some very basic things
 function core.debug(...) core.log(table.concat({...}, "\t")) end
+if core.print then
+       local core_print = core.print
+       -- Override native print and use
+       -- terminal if that's turned on
+       function print(...)
+               core_print(table.concat({...}, "\t"))
+       end
+       core.print = nil -- don't pollute our namespace
+end
 math.randomseed(os.time())
 os.setlocale("C", "numeric")
 minetest = core