mainmenu_csm/builtin/game/deprecated.lua

52 lines
1.4 KiB
Lua
Raw Normal View History

2012-04-01 11:37:41 +02:00
-- Minetest: builtin/deprecated.lua
--
-- Default material types
--
2015-10-11 14:10:26 +02:00
local function digprop_err()
core.log("deprecated", "The core.digprop_* functions are obsolete and need to be replaced by item groups.")
2012-04-01 11:37:41 +02:00
end
2014-04-28 03:02:48 +02: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 11:37:41 +02:00
function core.node_metadata_inventory_move_allow_all()
core.log("deprecated", "core.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
end
2012-04-01 11:37:41 +02:00
function core.add_to_creative_inventory(itemstring)
core.log("deprecated", "core.add_to_creative_inventory: This function is deprecated and does nothing.")
end
--
-- EnvRef
--
2014-04-28 03:02:48 +02:00
core.env = {}
local envref_deprecation_message_printed = false
2014-04-28 03:02:48 +02:00
setmetatable(core.env, {
__index = function(table, key)
if not envref_deprecation_message_printed then
core.log("deprecated", "core.env:[...] is deprecated and should be replaced with core.[...]")
envref_deprecation_message_printed = true
end
2014-04-28 03:02:48 +02:00
local func = core[key]
if type(func) == "function" then
rawset(table, key, function(self, ...)
return func(...)
end)
else
rawset(table, key, nil)
end
return rawget(table, key)
end
})
2013-11-12 22:13:00 +01:00
2014-04-28 03:02:48 +02: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 22:13:00 +01:00
end