76fcc8ed366cd8a021d2e976190abaebf41705f0
[oweals/minetest_game.git] / mods / default / legacy.lua
1 -- mods/default/legacy.lua
2
3 -- Horrible crap to support old code registering falling nodes
4 -- Don't use this and never do what this does, it's completely wrong!
5 -- (More specifically, the client and the C++ code doesn't get the group)
6 function default.register_falling_node(nodename, texture)
7         minetest.log("error", debug.traceback())
8         minetest.log('error', "WARNING: default.register_falling_node is deprecated")
9         if minetest.registered_nodes[nodename] then
10                 minetest.registered_nodes[nodename].groups.falling_node = 1
11         end
12 end
13
14 function default.spawn_falling_node(p, nodename)
15         spawn_falling_node(p, nodename)
16 end
17
18 -- Liquids
19 WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha
20 WATER_VISC = minetest.registered_nodes["default:water_source"].liquid_viscosity
21 LAVA_VISC = minetest.registered_nodes["default:lava_source"].liquid_viscosity
22 LIGHT_MAX = default.LIGHT_MAX
23
24 -- Formspecs
25 default.gui_suvival_form = default.gui_survival_form