wattle.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. ----------------------------------------------------------
  2. -- Wattle Construction
  3. -- woven stick based construction
  4. -------------------------------------------------
  5. -----------------------------------------------------------
  6. --WATTLE AND DAUB NODES AND CRAFTS
  7. --adds wattle
  8. minetest.register_node('earthbuild:wattle', {
  9. description = 'Wattle',
  10. drawtype = "nodebox",
  11. node_box = {
  12. type = "connected",
  13. fixed = {{-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}},
  14. -- connect_bottom =
  15. connect_front = {{-1/8, -1/2, -1/2, 1/8, 1/2, -1/8}},
  16. connect_left = {{-1/2, -1/2, -1/8, -1/8, 1/2, 1/8}},
  17. connect_back = {{-1/8, -1/2, 1/8, 1/8, 1/2, 1/2}},
  18. connect_right = {{ 1/8, -1/2, -1/8, 1/2, 1/2, 1/8}},
  19. },
  20. connects_to = { "group:crumbly", "group:wood", "group:tree", "group:stone", 'earthbuild:wattle', 'earthbuild:wattle_loose',},
  21. paramtype = "light",
  22. tiles = {"earthbuild_wattle_top.png", "earthbuild_wattle_top.png","earthbuild_wattle.png", "earthbuild_wattle.png", "earthbuild_wattle.png", "earthbuild_wattle.png" },
  23. inventory_image = "earthbuild_wattle.png",
  24. wield_image = "earthbuild_wattle.png",
  25. groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 1,},
  26. sounds = default.node_sound_wood_defaults(),
  27. })
  28. -- adds wattle recipe
  29. --(1 wattle per stick, makes it 4 times 'better' than wood)
  30. minetest.register_craft({
  31. output = 'earthbuild:wattle 4',
  32. recipe = {
  33. {'', '', ''},
  34. {'', 'group:stick', ''},
  35. {'group:stick', 'group:stick', 'group:stick'},
  36. }
  37. })
  38. --recover wattle from wattle and daub
  39. minetest.register_craft({
  40. output = 'earthbuild:wattle',
  41. recipe = {{'earthbuild:wattle_and_daub'}}
  42. })
  43. minetest.register_craft({
  44. output = 'earthbuild:wattle',
  45. recipe = {{'earthbuild:whitewashed_wattle_and_daub'}}
  46. })
  47. --recycle wattle
  48. minetest.register_craft({
  49. output = 'default:stick',
  50. recipe = {
  51. {'earthbuild:wattle'}
  52. }
  53. })
  54. ----------------------------
  55. --adds loose wattle (a crude window... or for resource saving)
  56. minetest.register_node('earthbuild:wattle_loose', {
  57. description = 'Loose Wattle',
  58. drawtype = "nodebox",
  59. node_box = {
  60. type = "connected",
  61. fixed = {{-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}},
  62. -- connect_bottom =
  63. connect_front = {{-1/8, -1/2, -1/2, 1/8, 1/2, -1/8}},
  64. connect_left = {{-1/2, -1/2, -1/8, -1/8, 1/2, 1/8}},
  65. connect_back = {{-1/8, -1/2, 1/8, 1/8, 1/2, 1/2}},
  66. connect_right = {{ 1/8, -1/2, -1/8, 1/2, 1/2, 1/8}},
  67. },
  68. connects_to = { "group:crumbly", "group:wood", "group:tree", "group:stone", 'earthbuild:wattle', 'earthbuild:wattle_loose', 'earthbuild:thatch'},
  69. paramtype = "light",
  70. tiles = {"earthbuild_wattle_top.png", "earthbuild_wattle_top.png","earthbuild_wattle_loose.png", "earthbuild_wattle_loose.png", "earthbuild_wattle_loose.png", "earthbuild_wattle_loose.png" },
  71. inventory_image = "earthbuild_wattle_loose.png",
  72. wield_image = "earthbuild_wattle_loose.png",
  73. groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 1,},
  74. sounds = default.node_sound_wood_defaults(),
  75. })
  76. --split
  77. minetest.register_craft({
  78. output = 'earthbuild:wattle_loose 4',
  79. recipe = {{ 'earthbuild:wattle','earthbuild:wattle'}}
  80. })
  81. --combine
  82. minetest.register_craft({
  83. output = 'earthbuild:wattle',
  84. recipe = {{'earthbuild:wattle_loose', 'earthbuild:wattle_loose'}}
  85. })
  86. --recycle loose wattle?
  87. --would only be half a stick... force to recombine into wattle
  88. ----------------------------
  89. -- adds wattle_and_daub
  90. minetest.register_node('earthbuild:wattle_and_daub', {
  91. description = 'Wattle and Daub',
  92. drawtype = "nodebox",
  93. node_box = {
  94. type = "connected",
  95. fixed = {{-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}},
  96. -- connect_bottom =
  97. connect_front = {{-1/4, -1/2, -1/2, 1/4, 1/2, -1/4}},
  98. connect_left = {{-1/2, -1/2, -1/4, -1/4, 1/2, 1/4}},
  99. connect_back = {{-1/4, -1/2, 1/4, 1/4, 1/2, 1/2}},
  100. connect_right = {{ 1/4, -1/2, -1/4, 1/2, 1/2, 1/4}},
  101. },
  102. connects_to = { "group:crumbly", "group:wood", "group:tree", "group:stone",'earthbuild:wattle', 'earthbuild:wattle_loose',},
  103. paramtype = "light",
  104. tiles = {"earthbuild_wattle_and_daub.png"},
  105. inventory_image = "earthbuild_wattle_and_daub.png",
  106. wield_image = "earthbuild_wattle_and_daub.png",
  107. groups = {crumbly = 2, cracky = 3, choppy = 2},
  108. sounds = default.node_sound_dirt_defaults(),
  109. })
  110. -- adds wattle_and_daub recipes
  111. minetest.register_craft({
  112. output = 'earthbuild:wattle_and_daub 6',
  113. recipe = {
  114. {'earthbuild:wattle', 'earthbuild:wattle', 'earthbuild:wattle'},
  115. {'earthbuild:wattle', 'earthbuild:wattle', 'earthbuild:wattle'},
  116. {'', 'earthbuild:cob', ''},
  117. }
  118. })
  119. ----------------------------------------------
  120. --Burnables
  121. minetest.register_craft({
  122. type = "fuel",
  123. recipe = "earthbuild:wattle",
  124. burntime = 3,
  125. })
  126. minetest.register_craft({
  127. type = "fuel",
  128. recipe = "earthbuild:wattle_loose",
  129. burntime = 1.5,
  130. })