Add functions to the default mod of minimal game to support old code 270/head
authorPilzAdam <adam-k@outlook.com>
Thu, 1 Nov 2012 17:49:12 +0000 (18:49 +0100)
committerPilzAdam <adam-k@outlook.com>
Thu, 1 Nov 2012 17:49:12 +0000 (18:49 +0100)
games/minimal/mods/default/init.lua

index cf28058430df19223faea895d69f580c66fc7be7..5f4d8e06348ce019a4b2c51d081cabab1063e27f 100644 (file)
@@ -1586,6 +1586,22 @@ minetest.register_alias("mapgen_stone_with_coal", "default:stone_with_coal")
 minetest.register_alias("mapgen_stone_with_iron", "default:stone_with_iron")
 minetest.register_alias("mapgen_mese", "default:mese")
 
+-- Support old code
+function default.spawn_falling_node(p, nodename)
+       spawn_falling_node(p, nodename)
+end
+
+-- Horrible crap to support old code
+-- 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
+
 --
 -- Global callbacks
 --