init.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. print("[stairsplus] loaded.")
  2. stairsplus = {}
  3. dofile(minetest.get_modpath(minetest.get_current_modname()).."/stair.lua")
  4. dofile(minetest.get_modpath(minetest.get_current_modname()).."/corner.lua")
  5. dofile(minetest.get_modpath(minetest.get_current_modname()).."/slab.lua")
  6. dofile(minetest.get_modpath(minetest.get_current_modname()).."/quater_slab.lua")
  7. dofile(minetest.get_modpath(minetest.get_current_modname()).."/wall.lua")
  8. dofile(minetest.get_modpath(minetest.get_current_modname()).."/quater_wall.lua")
  9. dofile(minetest.get_modpath(minetest.get_current_modname()).."/panel.lua")
  10. dofile(minetest.get_modpath(minetest.get_current_modname()).."/micro.lua")
  11. -- Nodes will be called <modname>:{stair,corner,slab,wall,panel,micro}_<subname>
  12. function stairsplus.register_stair_and_slab_and_panel_and_micro(modname, subname, recipeitem, groups, images, desc_stair, desc_corner, desc_slab, desc_wall, desc_panel, desc_micro, drop, sounds, sunlight)
  13. stairsplus.register_stair(modname, subname, recipeitem, groups, images, desc_stair, drop, sounds, sunlight)
  14. stairsplus.register_corner(modname, subname, recipeitem, groups, images, desc_corner, drop, sounds, sunlight)
  15. stairsplus.register_slab(modname, subname, recipeitem, groups, images, desc_slab, drop, sounds, sunlight)
  16. stairsplus.register_wall(modname, subname, recipeitem, groups, images, desc_slab, drop, sounds, sunlight)
  17. stairsplus.register_panel(modname, subname, recipeitem, groups, images, desc_panel, drop, sounds, sunlight)
  18. stairsplus.register_micro(modname, subname, recipeitem, groups, images, desc_micro, drop, sounds, sunlight)
  19. end
  20. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "wood", "default:wood",
  21. {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1},
  22. {"default_wood.png"},
  23. "Wooden Stairs",
  24. "Wooden Corner",
  25. "Wooden Slab",
  26. "Wooden Wall",
  27. "Wooden Panel",
  28. "Wooden Microblock",
  29. "wood",
  30. default.node_sound_wood_defaults()
  31. )
  32. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "stone", "default:stone",
  33. {cracky=3, not_in_creative_inventory=1, not_in_craft_guide=1},
  34. {"default_stone.png"},
  35. "Stone Stairs",
  36. "Stone Corner",
  37. "Stone Slab",
  38. "Stone Wall",
  39. "Stone Panel",
  40. "Stone Microblock",
  41. "cobble",
  42. default.node_sound_stone_defaults()
  43. )
  44. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "cobble", "default:cobble",
  45. {cracky=3, not_in_creative_inventory=1, not_in_craft_guide=1},
  46. {"default_cobble.png"},
  47. "Cobblestone Stairs",
  48. "Cobblestone Corner",
  49. "Cobblestone Slab",
  50. "Cobblestone Wall",
  51. "Cobblestone Panel",
  52. "Cobblestone Microblock",
  53. "cobble",
  54. default.node_sound_stone_defaults()
  55. )
  56. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "brick", "default:brick",
  57. {cracky=3, not_in_creative_inventory=1, not_in_craft_guide=1},
  58. {"default_brick.png"},
  59. "Brick Stairs",
  60. "Brick Corner",
  61. "Brick Slab",
  62. "Brick Wall",
  63. "Brick Panel",
  64. "Brick Microblock",
  65. "brick",
  66. default.node_sound_stone_defaults()
  67. )
  68. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "steelblock", "default:steelblock",
  69. {snappy=1,bendy=2,cracky=1,melty=2,level=2, not_in_creative_inventory=1, not_in_craft_guide=1},
  70. {"default_steel_block.png"},
  71. "Steel Block Stairs",
  72. "Steel Block Corner",
  73. "Steel Block Slab",
  74. "Steel Block Wall",
  75. "Steel Block Panel",
  76. "Steel Microblock",
  77. "steelblock",
  78. default.node_sound_stone_defaults()
  79. )
  80. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "desert_stone", "default:desert_stone",
  81. {cracky=3, not_in_creative_inventory=1, not_in_craft_guide=1},
  82. {"default_desert_stone.png"},
  83. "Desert Stone Stairs",
  84. "Desert Stone Corner",
  85. "Desert Stone Slab",
  86. "Desert Stone Wall",
  87. "Desert Stone Panel",
  88. "Desert Stone Microblock",
  89. "desert_stone",
  90. default.node_sound_stone_defaults()
  91. )
  92. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "glass", "default:glass",
  93. {cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, not_in_craft_guide=1},
  94. {"default_glass.png"},
  95. "Glass Stairs",
  96. "Glass Corner",
  97. "Glass Slab",
  98. "Glass Wall",
  99. "Glass Panel",
  100. "Glass Microblock",
  101. "glass",
  102. default.node_sound_glass_defaults(),
  103. true)
  104. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "sandstone", "default:sandstone",
  105. {crumbly=2, cracky=2, not_in_creative_inventory=1, not_in_craft_guide=1},
  106. {"default_sandstone.png"},
  107. "Sandstone Stairs",
  108. "Sandstone Corner",
  109. "Sandstone Slab",
  110. "Sandstone Wall",
  111. "Sandstone Panel",
  112. "Sandstone Microblock",
  113. "sandstone",
  114. default.node_sound_stone_defaults()
  115. )
  116. stairsplus.register_stair_and_slab_and_panel_and_micro("stairsplus", "stonebrick", "default:stonebrick",
  117. {cracky=1, not_in_creative_inventory=1, not_in_craft_guide=1},
  118. {"default_stone_brick.png"},
  119. "Stone Brick Stairs",
  120. "Stone Brick Corner",
  121. "Stone Brick Slab",
  122. "Stone Brick Wall",
  123. "Stone Brick Panel",
  124. "Stone Brick Microblock",
  125. "stonebrick",
  126. default.node_sound_stone_defaults()
  127. )
  128. minetest.register_craft({
  129. output = "mesecons_pressureplates:pressure_plate_wood_off",
  130. recipe = {
  131. {"group:wood", "group:stick", "group:wood"},
  132. },
  133. })
  134. minetest.register_craft({
  135. output = "mesecons_pressureplates:pressure_plate_stone_off",
  136. recipe = {
  137. {"group:stone", "group:stick", "group:stone"},
  138. },
  139. })