Refactoring and code style fixes in preparation of adding mesh typed items
[oweals/minetest.git] / builtin / init.lua
index 6fc1bf6d5732ecec60819b0a87b6f01122ba5a79..b3004468e5efd5ce853d6f942181ba5ccd9d516c 100644 (file)
@@ -6,7 +6,16 @@
 --
 
 -- Initialize some very basic things
-print = core.debug
+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
@@ -17,6 +26,7 @@ local gamepath = scriptdir.."game"..DIR_DELIM
 local commonpath = scriptdir.."common"..DIR_DELIM
 local asyncpath = scriptdir.."async"..DIR_DELIM
 
+dofile(commonpath.."strict.lua")
 dofile(commonpath.."serialize.lua")
 dofile(commonpath.."misc_helpers.lua")