stone_wall.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. -- internationalization boilerplate
  2. local MP = minetest.get_modpath(minetest.get_current_modname())
  3. local S, NS = dofile(MP.."/intllib.lua")
  4. minetest.register_alias("castle:stonewall", "castle_masonry:stonewall")
  5. minetest.register_alias("castle:dungeon_stone", "castle_masonry:dungeon_stone")
  6. minetest.register_alias("castle:rubble", "castle_masonry:rubble")
  7. minetest.register_alias("castle:stonewall_corner", "castle_masonry:stonewall_corner")
  8. minetest.register_node("castle_masonry:stonewall", {
  9. description = S("Castle Wall"),
  10. drawtype = "normal",
  11. tiles = {"castle_stonewall.png"},
  12. paramtype = "light",
  13. drop = "castle_masonry:stonewall",
  14. groups = {cracky=3},
  15. sunlight_propagates = false,
  16. sounds = default.node_sound_stone_defaults(),
  17. })
  18. minetest.register_node("castle_masonry:rubble", {
  19. description = S("Castle Rubble"),
  20. drawtype = "normal",
  21. tiles = {"castle_rubble.png"},
  22. paramtype = "light",
  23. groups = {crumbly=3,falling_node=1},
  24. sounds = default.node_sound_gravel_defaults(),
  25. })
  26. minetest.register_craft({
  27. output = "castle_masonry:stonewall",
  28. recipe = {
  29. {"default:cobble"},
  30. {"default:desert_stone"},
  31. }
  32. })
  33. minetest.register_craft({
  34. output = "castle_masonry:rubble",
  35. recipe = {
  36. {"castle_masonry:stonewall"},
  37. }
  38. })
  39. minetest.register_craft({
  40. output = "castle_masonry:rubble 2",
  41. recipe = {
  42. {"default:gravel"},
  43. {"default:desert_stone"},
  44. }
  45. })
  46. minetest.register_node("castle_masonry:stonewall_corner", {
  47. drawtype = "normal",
  48. paramtype = "light",
  49. paramtype2 = "facedir",
  50. description = S("Castle Corner"),
  51. tiles = {"castle_corner_stonewall_tb.png^[transformR90",
  52. "castle_corner_stonewall_tb.png^[transformR180",
  53. "castle_corner_stonewall1.png",
  54. "castle_stonewall.png",
  55. "castle_stonewall.png",
  56. "castle_corner_stonewall2.png"},
  57. groups = {cracky=3},
  58. sounds = default.node_sound_stone_defaults(),
  59. })
  60. minetest.register_craft({
  61. output = "castle_masonry:stonewall_corner",
  62. recipe = {
  63. {"", "castle_masonry:stonewall"},
  64. {"castle_masonry:stonewall", "default:sandstone"},
  65. }
  66. })
  67. if minetest.get_modpath("moreblocks") then
  68. stairsplus:register_all("castle_masonry", "stonewall", "castle_masonry:stonewall", {
  69. description = S("Stone Wall"),
  70. tiles = {"castle_stonewall.png"},
  71. groups = {cracky=3, not_in_creative_inventory=1},
  72. sounds = default.node_sound_stone_defaults(),
  73. sunlight_propagates = true,
  74. })
  75. stairsplus:register_all("castle_masonry", "rubble", "castle_masonry:rubble", {
  76. description = S("Rubble"),
  77. tiles = {"castle_rubble.png"},
  78. groups = {cracky=3, not_in_creative_inventory=1},
  79. sounds = default.node_sound_gravel_defaults(),
  80. sunlight_propagates = true,
  81. })
  82. stairsplus:register_stair_alias("castle", "stonewall", "castle_masonry", "stonewall")
  83. stairsplus:register_stair_alias("castle", "rubble", "castle_masonry", "rubble")
  84. elseif minetest.get_modpath("stairs") then
  85. stairs.register_stair_and_slab("stonewall", "castle_masonry:stonewall",
  86. {cracky=3},
  87. {"castle_stonewall.png"},
  88. S("Castle Stonewall Stair"),
  89. S("Castle Stonewall Slab"),
  90. default.node_sound_stone_defaults()
  91. )
  92. stairs.register_stair_and_slab("rubble", "castle_masonry:rubble",
  93. {cracky=3},
  94. {"castle_rubble.png"},
  95. S("Castle Rubble Stair"),
  96. S("Castle Rubble Slab"),
  97. default.node_sound_stone_defaults()
  98. )
  99. end
  100. --------------------------------------------------------------------------------------------------------------
  101. minetest.register_node("castle_masonry:dungeon_stone", {
  102. description = S("Dungeon Stone"),
  103. drawtype = "normal",
  104. tiles = {"castle_dungeon_stone.png"},
  105. groups = {cracky=2},
  106. paramtype = "light",
  107. sounds = default.node_sound_stone_defaults(),
  108. })
  109. minetest.register_craft({
  110. output = "castle_masonry:dungeon_stone 2",
  111. recipe = {
  112. {"default:stonebrick", "default:obsidian"},
  113. }
  114. })
  115. minetest.register_craft({
  116. output = "castle_masonry:dungeon_stone 2",
  117. recipe = {
  118. {"default:stonebrick"},
  119. {"default:obsidian"},
  120. }
  121. })
  122. if minetest.get_modpath("moreblocks") then
  123. stairsplus:register_all("castle", "dungeon_stone", "castle_masonry:dungeon_stone", {
  124. description = S("Dungeon Stone"),
  125. tiles = {"castle_dungeon_stone.png"},
  126. groups = {cracky=2, not_in_creative_inventory=1},
  127. sounds = default.node_sound_stone_defaults(),
  128. sunlight_propagates = true,
  129. })
  130. stairsplus:register_stair_alias("castle", "dungeon_stone", "castle_masonry", "dungeon_stone")
  131. elseif minetest.get_modpath("stairs") then
  132. stairs.register_stair_and_slab("dungeon_stone", "castle_masonry:dungeon_stone",
  133. {cracky=2},
  134. {"castle_dungeon_stone.png"},
  135. S("Dungeon Stone Stair"),
  136. S("Dungeon Stone Slab"),
  137. default.node_sound_stone_defaults()
  138. )
  139. end