2014-12-25 00:13:15 +01:00
|
|
|
-- mods/default/legacy.lua
|
|
|
|
|
2016-09-08 01:16:16 +02:00
|
|
|
-- Horrible stuff to support old code registering falling nodes
|
2014-12-25 00:13:15 +01:00
|
|
|
-- Don't use this and never do what this does, it's completely wrong!
|
|
|
|
-- (More specifically, the client and the C++ code doesn't get the group)
|
|
|
|
function default.register_falling_node(nodename, texture)
|
|
|
|
minetest.log("error", debug.traceback())
|
|
|
|
minetest.log('error', "WARNING: default.register_falling_node is deprecated")
|
|
|
|
if minetest.registered_nodes[nodename] then
|
|
|
|
minetest.registered_nodes[nodename].groups.falling_node = 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function default.spawn_falling_node(p, nodename)
|
|
|
|
spawn_falling_node(p, nodename)
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Liquids
|
|
|
|
WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha
|
|
|
|
WATER_VISC = minetest.registered_nodes["default:water_source"].liquid_viscosity
|
|
|
|
LAVA_VISC = minetest.registered_nodes["default:lava_source"].liquid_viscosity
|
|
|
|
LIGHT_MAX = default.LIGHT_MAX
|
|
|
|
|
|
|
|
-- Formspecs
|
|
|
|
default.gui_suvival_form = default.gui_survival_form
|
2019-01-03 02:57:13 +01:00
|
|
|
default.gui_bg = ""
|
|
|
|
default.gui_bg_img = ""
|
|
|
|
default.gui_slots = ""
|
2017-07-26 20:38:11 +02:00
|
|
|
|
|
|
|
-- Players
|
|
|
|
if minetest.get_modpath("player_api") then
|
|
|
|
default.registered_player_models = player_api.registered_models
|
|
|
|
default.player_register_model = player_api.register_model
|
|
|
|
default.player_attached = player_api.player_attached
|
|
|
|
default.player_get_animation = player_api.get_animation
|
|
|
|
default.player_set_model = player_api.set_model
|
|
|
|
default.player_set_textures = player_api.set_textures
|
|
|
|
default.player_set_animation = player_api.set_animation
|
|
|
|
end
|
2017-11-26 12:44:55 +01:00
|
|
|
|
|
|
|
-- Chests
|
|
|
|
default.register_chest = default.chest.register_chest
|
2018-01-27 01:52:14 +01:00
|
|
|
|
|
|
|
-- Check for a volume intersecting protection
|
|
|
|
function default.intersects_protection(minp, maxp, player_name, interval)
|
|
|
|
minetest.log("warning", "default.intersects_protection() is " ..
|
2018-02-25 12:30:36 +01:00
|
|
|
"deprecated, use minetest.is_area_protected() instead.")
|
|
|
|
minetest.is_area_protected(minp, maxp, player_name, interval)
|
2018-01-27 01:52:14 +01:00
|
|
|
end
|