updated to match current moreblocks/stairsplus API
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Mon, 16 Jun 2014 09:25:46 +0000 (05:25 -0400)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Mon, 16 Jun 2014 09:25:46 +0000 (05:25 -0400)
node_defs.lua

index 6e7572ff3a71cc6055a81b5613842358849c1982..ceecc72384cfc5c3304cd0422b0254f662ea59b2 100644 (file)
@@ -177,109 +177,35 @@ for i in ipairs(moretrees.treelist) do
 
                if minetest.get_modpath("moreblocks") and moretrees.enable_stairsplus then
 
-                       register_stair(
-                               "moretrees",
-                               treename.."_trunk",
-                               "moretrees:"..treename.."_trunk",
-                               { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_stair=1 },
-                               {       "moretrees_"..treename.."_trunk_top.png",
-                                       "moretrees_"..treename.."_trunk_top.png",
-                                       "moretrees_"..treename.."_trunk.png"
-                               },
-                               S(treedesc.." Trunk"),
-                               treename.."_trunk",
-                               0
-                       )
-
-                       register_slab(
-                               "moretrees",
-                               treename.."_trunk",
-                               "moretrees:"..treename.."_trunk",
-                               { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_slab=1 },
-                               {       "moretrees_"..treename.."_trunk_top.png",
-                                       "moretrees_"..treename.."_trunk_top.png",
-                                       "moretrees_"..treename.."_trunk.png"
-                               },
-                               S(treedesc.." Trunk"),
-                               treename.."_trunk",
-                               0
-                       )
+--                     stairsplus:register_all(modname, subname, recipeitem, {fields})
 
-                       register_panel(
+                       stairsplus:register_all(
                                "moretrees",
                                treename.."_trunk",
-                               "moretrees:"..treename.."_trunk",
-                               { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_panel=1 },
-                               {       "moretrees_"..treename.."_trunk_top.png",
-                                       "moretrees_"..treename.."_trunk_top.png",
-                                       "moretrees_"..treename.."_trunk.png"
-                               },
-                               S(treedesc.." Trunk"),
-                               treename.."_trunk",
-                               0
-                       )
-
-                       register_micro(
-                               "moretrees",
-                               treename.."_trunk",
-                               "moretrees:"..treename.."_trunk",
-                               { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_micro=1 },
-                               {       "moretrees_"..treename.."_trunk_top.png",
-                                       "moretrees_"..treename.."_trunk_top.png",
-                                       "moretrees_"..treename.."_trunk.png"
-                               },
-                               S(treedesc.." Trunk"),
-                               treename.."_trunk",
-                               0
-                       )
-
-                       register_stair(
-                               "moretrees",
-                               treename.."_planks",
-                               "moretrees:"..treename.."_planks",
-                               { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_stair=1 },
-                               { "moretrees_"..treename.."_wood.png" },
-                               S(treedesc.." Planks"),
-                               treename.."_planks",
-                               0
-                       )
-
-                       register_slab(
-                               "moretrees",
-                               treename.."_planks",
-                               "moretrees:"..treename.."_planks",
-                               { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_slab=1 },
-                               { "moretrees_"..treename.."_wood.png" },
-                               S(treedesc.." Planks"),
-                               treename.."_planks",
-                               0
-                       )
-
-                       register_panel(
-                               "moretrees",
-                               treename.."_planks",
-                               "moretrees:"..treename.."_planks",
-                               { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_panel=1 },
-                               { "moretrees_"..treename.."_wood.png" },
-                               S(treedesc.." Planks"),
-                               treename.."_planks",
-                               0
+                               "moretrees:"..treename.."_trunk", 
+                               {
+                                       groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 },
+                                       tiles = {
+                                               "moretrees_"..treename.."_trunk_top.png",
+                                               "moretrees_"..treename.."_trunk_top.png",
+                                               "moretrees_"..treename.."_trunk.png"
+                                       },
+                                       description = S(treedesc.." Trunk"),
+                                       drop = treename.."_trunk",
+                               }
                        )
 
-                       register_micro(
+                       stairsplus:register_all(
                                "moretrees",
                                treename.."_planks",
                                "moretrees:"..treename.."_planks",
-                               { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_micro=1 },
-                               { "moretrees_"..treename.."_wood.png" },
-                               S(treedesc.." Planks"),
-                               treename.."_planks",
-                               0
+                               {
+                                       groups = { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1 },
+                                       tiles = { "moretrees_"..treename.."_wood.png" },
+                                       description = S(treedesc.." Planks"),
+                                       drop = treename.."_planks",
+                               }
                        )
-
-
-                       table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_trunk")
-                       table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_planks")
                end
        end