diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-04-27 21:02:48 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-05-08 13:02:04 -0400 |
commit | c4359ff65cd8e4e754442b9f2ef7051a8eaa4241 (patch) | |
tree | feaad8be8c36cc4a0abdbe8d7b84db3ac68ed87e /builtin/game/deprecated.lua | |
parent | 1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528 (diff) | |
download | minetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.tar.gz minetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.tar.bz2 minetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.zip |
Use "core" namespace internally
Diffstat (limited to 'builtin/game/deprecated.lua')
-rw-r--r-- | builtin/game/deprecated.lua | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/builtin/game/deprecated.lua b/builtin/game/deprecated.lua index d8b578d48..bbe68be3e 100644 --- a/builtin/game/deprecated.lua +++ b/builtin/game/deprecated.lua @@ -4,38 +4,38 @@ -- Default material types -- function digprop_err() - minetest.log("info", debug.traceback()) - minetest.log("info", "WARNING: The minetest.digprop_* functions are obsolete and need to be replaced by item groups.") + core.log("info", debug.traceback()) + core.log("info", "WARNING: The core.digprop_* functions are obsolete and need to be replaced by item groups.") end -minetest.digprop_constanttime = digprop_err -minetest.digprop_stonelike = digprop_err -minetest.digprop_dirtlike = digprop_err -minetest.digprop_gravellike = digprop_err -minetest.digprop_woodlike = digprop_err -minetest.digprop_leaveslike = digprop_err -minetest.digprop_glasslike = digprop_err +core.digprop_constanttime = digprop_err +core.digprop_stonelike = digprop_err +core.digprop_dirtlike = digprop_err +core.digprop_gravellike = digprop_err +core.digprop_woodlike = digprop_err +core.digprop_leaveslike = digprop_err +core.digprop_glasslike = digprop_err -minetest.node_metadata_inventory_move_allow_all = function() - minetest.log("info", "WARNING: minetest.node_metadata_inventory_move_allow_all is obsolete and does nothing.") +core.node_metadata_inventory_move_allow_all = function() + core.log("info", "WARNING: core.node_metadata_inventory_move_allow_all is obsolete and does nothing.") end -minetest.add_to_creative_inventory = function(itemstring) - minetest.log('info', "WARNING: minetest.add_to_creative_inventory: This function is deprecated and does nothing.") +core.add_to_creative_inventory = function(itemstring) + core.log('info', "WARNING: core.add_to_creative_inventory: This function is deprecated and does nothing.") end -- -- EnvRef -- -minetest.env = {} +core.env = {} local envref_deprecation_message_printed = false -setmetatable(minetest.env, { +setmetatable(core.env, { __index = function(table, key) if not envref_deprecation_message_printed then - minetest.log("info", "WARNING: minetest.env:[...] is deprecated and should be replaced with minetest.[...]") + core.log("info", "WARNING: core.env:[...] is deprecated and should be replaced with core.[...]") envref_deprecation_message_printed = true end - local func = minetest[key] + local func = core[key] if type(func) == "function" then rawset(table, key, function(self, ...) return func(...) @@ -47,7 +47,7 @@ setmetatable(minetest.env, { end }) -function minetest.rollback_get_last_node_actor(pos, range, seconds) - return minetest.rollback_get_node_actions(pos, range, seconds, 1)[1] +function core.rollback_get_last_node_actor(pos, range, seconds) + return core.rollback_get_node_actions(pos, range, seconds, 1)[1] end |