2012-04-01 05:37:41 -04:00
|
|
|
-- Minetest: builtin/deprecated.lua
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Default material types
|
|
|
|
--
|
2015-10-11 08:10:26 -04:00
|
|
|
local function digprop_err()
|
2014-04-27 21:02:48 -04:00
|
|
|
core.log("info", debug.traceback())
|
|
|
|
core.log("info", "WARNING: The core.digprop_* functions are obsolete and need to be replaced by item groups.")
|
2012-04-01 05:37:41 -04:00
|
|
|
end
|
|
|
|
|
2014-04-27 21:02:48 -04:00
|
|
|
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
|
2012-04-01 05:37:41 -04:00
|
|
|
|
2014-04-27 21:02:48 -04:00
|
|
|
core.node_metadata_inventory_move_allow_all = function()
|
|
|
|
core.log("info", "WARNING: core.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
|
2012-07-24 19:36:54 -04:00
|
|
|
end
|
2012-04-01 05:37:41 -04:00
|
|
|
|
2014-04-27 21:02:48 -04:00
|
|
|
core.add_to_creative_inventory = function(itemstring)
|
|
|
|
core.log('info', "WARNING: core.add_to_creative_inventory: This function is deprecated and does nothing.")
|
2012-07-25 10:59:37 -04:00
|
|
|
end
|
|
|
|
|
2013-05-24 18:51:02 -04:00
|
|
|
--
|
|
|
|
-- EnvRef
|
|
|
|
--
|
2014-04-27 21:02:48 -04:00
|
|
|
core.env = {}
|
2013-05-24 18:51:02 -04:00
|
|
|
local envref_deprecation_message_printed = false
|
2014-04-27 21:02:48 -04:00
|
|
|
setmetatable(core.env, {
|
2013-05-24 18:51:02 -04:00
|
|
|
__index = function(table, key)
|
|
|
|
if not envref_deprecation_message_printed then
|
2014-04-27 21:02:48 -04:00
|
|
|
core.log("info", "WARNING: core.env:[...] is deprecated and should be replaced with core.[...]")
|
2013-05-24 18:51:02 -04:00
|
|
|
envref_deprecation_message_printed = true
|
|
|
|
end
|
2014-04-27 21:02:48 -04:00
|
|
|
local func = core[key]
|
2013-05-24 18:51:02 -04:00
|
|
|
if type(func) == "function" then
|
|
|
|
rawset(table, key, function(self, ...)
|
2013-08-18 09:15:33 -04:00
|
|
|
return func(...)
|
2013-05-24 18:51:02 -04:00
|
|
|
end)
|
|
|
|
else
|
|
|
|
rawset(table, key, nil)
|
|
|
|
end
|
|
|
|
return rawget(table, key)
|
|
|
|
end
|
|
|
|
})
|
2013-11-12 16:13:00 -05:00
|
|
|
|
2014-04-27 21:02:48 -04:00
|
|
|
function core.rollback_get_last_node_actor(pos, range, seconds)
|
|
|
|
return core.rollback_get_node_actions(pos, range, seconds, 1)[1]
|
2013-11-12 16:13:00 -05:00
|
|
|
end
|