2012-04-01 05:37:41 -04:00
|
|
|
-- Minetest: builtin/deprecated.lua
|
|
|
|
|
|
|
|
--
|
|
|
|
-- 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.")
|
|
|
|
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
|
|
|
|
|
2012-07-24 19:36:54 -04:00
|
|
|
minetest.node_metadata_inventory_move_allow_all = function()
|
|
|
|
minetest.log("info", "WARNING: minetest.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
|
|
|
|
end
|
2012-04-01 05:37:41 -04:00
|
|
|
|
2012-07-25 10:59:37 -04:00
|
|
|
minetest.add_to_creative_inventory = function(itemstring)
|
|
|
|
minetest.log('info', "WARNING: minetest.add_to_creative_inventory: This function is deprecated and does nothing.")
|
|
|
|
end
|
|
|
|
|
2013-05-24 18:51:02 -04:00
|
|
|
--
|
|
|
|
-- EnvRef
|
|
|
|
--
|
|
|
|
minetest.env = {}
|
|
|
|
local envref_deprecation_message_printed = false
|
|
|
|
setmetatable(minetest.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.[...]")
|
|
|
|
envref_deprecation_message_printed = true
|
|
|
|
end
|
|
|
|
local func = minetest[key]
|
|
|
|
if type(func) == "function" then
|
|
|
|
rawset(table, key, function(self, ...)
|
|
|
|
return func(unpack({...}))
|
|
|
|
end)
|
|
|
|
else
|
|
|
|
rawset(table, key, nil)
|
|
|
|
end
|
|
|
|
return rawget(table, key)
|
|
|
|
end
|
|
|
|
})
|