123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- -- Node will be called <modname>panel_<subname>
- function stairsplus.register_panel(modname, subname, recipeitem, groups, images, description, drop, sounds, sunlight)
- --
- -- nodes
- --
- minetest.register_node(modname .. ":panel_" .. subname .. "_bottom", {
- description = description,
- drawtype = "nodebox",
- tiles = images,
- paramtype = "light",
- paramtype2 = "facedir",
- is_ground_content = false,
- sunlight_propagates = sunlight,
- groups = groups,
- drop = modname .. ":panel_" .. drop .. "_bottom",
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
- },
- sounds = sounds,
- })
-
- minetest.register_node(modname .. ":panel_" .. subname .. "_top", {
- description = description,
- drawtype = "nodebox",
- tiles = images,
- paramtype = "light",
- paramtype2 = "facedir",
- is_ground_content = false,
- sunlight_propagates = sunlight,
- groups = groups,
- drop = modname .. ":panel_" .. drop .. "_top",
- node_box = {
- type = "fixed",
- fixed = {-0.5, 0, 0, 0.5, 0.5, 0.5},
- },
- sounds = sounds,
- })
-
- minetest.register_node(modname .. ":panel_" .. subname .. "_vertical", {
- description = description,
- drawtype = "nodebox",
- tiles = images,
- paramtype = "light",
- paramtype2 = "facedir",
- is_ground_content = false,
- sunlight_propagates = sunlight,
- groups = groups,
- drop = modname .. ":panel_" .. drop .. "_vertical",
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, 0, 0, 0.5, 0.5},
- },
- sounds = sounds,
- })
- --
- -- crafting
- --
-
- minetest.register_craft({
- output = modname .. ":panel_" .. subname .. "_bottom 8",
- recipe = {
- {recipeitem, recipeitem},
- },
- })
-
- minetest.register_craft({
- output = modname .. ":panel_" .. subname .. "_vertical 8",
- recipe = {
- {recipeitem},
- {recipeitem},
- },
- })
-
- minetest.register_craft({
- output = recipeitem,
- recipe = {
- {modname .. ":panel_" .. subname .. "_bottom", modname .. ":panel_" .. subname .. "_bottom"},
- {modname .. ":panel_" .. subname .. "_bottom", modname .. ":panel_" .. subname .. "_bottom"},
- },
- })
-
- minetest.register_craft({
- output = recipeitem,
- recipe = {
- {modname .. ":panel_" .. subname .. "_top", modname .. ":panel_" .. subname .. "_top"},
- {modname .. ":panel_" .. subname .. "_top", modname .. ":panel_" .. subname .. "_top"},
- },
- })
-
- minetest.register_craft({
- output = recipeitem,
- recipe = {
- {modname .. ":panel_" .. subname .. "_vertical", modname .. ":panel_" .. subname .. "_vertical"},
- {modname .. ":panel_" .. subname .. "_vertical", modname .. ":panel_" .. subname .. "_vertical"},
- },
- })
-
- minetest.register_craft({
- output = modname .. ":panel_" .. subname .. "_top 1",
- recipe = {
- {modname .. ":panel_" .. subname .. "_bottom"},
- },
- })
-
- minetest.register_craft({
- output = modname .. ":panel_" .. subname .. "_bottom 1",
- recipe = {
- {modname .. ":panel_" .. subname .. "_top"},
- },
- })
-
- minetest.register_craft({
- output = modname .. ":panel_" .. subname .. "_vertical 2",
- recipe = {
- {modname .. ":panel_" .. subname .. "_bottom"},
- {modname .. ":panel_" .. subname .. "_bottom"},
- },
- })
-
- minetest.register_craft({
- output = modname .. ":panel_" .. subname .. "_bottom 2",
- recipe = {
- {modname .. ":panel_" .. subname .. "_vertical", modname .. ":panel_" .. subname .. "_vertical"},
- },
- })
- --
- -- cooking
- --
-
- minetest.register_craft({
- type = "cooking",
- output = modname .. ":panel_stone_bottom",
- recipe = modname .. ":panel_cobble_bottom",
- })
-
- minetest.register_craft({
- type = "cooking",
- output = modname .. ":panel_stone_top",
- recipe = modname .. ":panel_cobble_top",
- })
-
- minetest.register_craft({
- type = "cooking",
- output = modname .. ":panel_stone_vertical",
- recipe = modname .. ":panel_cobble_vertical",
- })
- end
|