roofing.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. ----------------------------------------------------------
  2. -- Roofing
  3. -- Materials for making a roof, upper story floors, shelves etc
  4. -------------------------------------------------
  5. -----------------------------------------------------------
  6. --EARTH AND COB WOOD SUPPORTED NODES AND CRAFTS
  7. --RAMMED EARTH
  8. --------------------
  9. -- supported rammed_earth
  10. minetest.register_node('earthbuild:supported_rammed_earth', {
  11. description = 'Supported Rammed Earth',
  12. drawtype = "normal",
  13. tiles = {
  14. "earthbuild_rammed_earth.png",
  15. "default_wood.png",
  16. "earthbuild_supported_rammed_earth.png",
  17. "earthbuild_supported_rammed_earth.png",
  18. "earthbuild_supported_rammed_earth.png",
  19. "earthbuild_supported_rammed_earth.png"
  20. },
  21. paramtype = "light",
  22. groups = {crumbly = 1, cracky = 3, choppy = 2, flammable=1},
  23. sounds = default.node_sound_dirt_defaults(),
  24. })
  25. -- adds supported rammed_earth recipe
  26. minetest.register_craft({
  27. output = 'earthbuild:supported_rammed_earth 3',
  28. recipe = {
  29. {'earthbuild:rammed_earth', 'earthbuild:rammed_earth', 'earthbuild:rammed_earth'},
  30. {'default:wood', '', ''},
  31. {'', '', ''},
  32. }
  33. })
  34. ------------------------
  35. -- jungle wood supported rammed_earth
  36. minetest.register_node('earthbuild:junglewood_supported_rammed_earth', {
  37. description = 'Jungle Wood Supported Rammed Earth',
  38. drawtype = "normal",
  39. tiles = {
  40. "earthbuild_rammed_earth.png",
  41. "default_junglewood.png",
  42. "earthbuild_junglewood_supported_rammed_earth.png",
  43. "earthbuild_junglewood_supported_rammed_earth.png",
  44. "earthbuild_junglewood_supported_rammed_earth.png",
  45. "earthbuild_junglewood_supported_rammed_earth.png"
  46. },
  47. paramtype = "light",
  48. groups = {crumbly = 1, cracky = 3, choppy = 2, flammable=1},
  49. sounds = default.node_sound_dirt_defaults(),
  50. })
  51. -- adds jungle wood supported rammed_earth recipe
  52. minetest.register_craft({
  53. output = 'earthbuild:junglewood_supported_rammed_earth 3',
  54. recipe = {
  55. {'earthbuild:rammed_earth', 'earthbuild:rammed_earth', 'earthbuild:rammed_earth'},
  56. {'default:junglewood', '', ''},
  57. {'', '', ''},
  58. }
  59. })
  60. ---------------------------
  61. -- pine wood supported rammed_earth
  62. minetest.register_node('earthbuild:pine_wood_supported_rammed_earth', {
  63. description = 'Pine Wood Supported Rammed Earth',
  64. drawtype = "normal",
  65. tiles = {
  66. "earthbuild_rammed_earth.png",
  67. "default_pine_wood.png",
  68. "earthbuild_pine_wood_supported_rammed_earth.png",
  69. "earthbuild_pine_wood_supported_rammed_earth.png",
  70. "earthbuild_pine_wood_supported_rammed_earth.png",
  71. "earthbuild_pine_wood_supported_rammed_earth.png"
  72. },
  73. paramtype = "light",
  74. groups = {crumbly = 1, cracky = 3, choppy = 2, flammable=1},
  75. sounds = default.node_sound_dirt_defaults(),
  76. })
  77. -- adds pine wood supported rammed_earth recipe
  78. minetest.register_craft({
  79. output = 'earthbuild:pine_wood_supported_rammed_earth 3',
  80. recipe = {
  81. {'earthbuild:rammed_earth', 'earthbuild:rammed_earth', 'earthbuild:rammed_earth'},
  82. {'default:pine_wood', '', ''},
  83. {'', '', ''},
  84. }
  85. })
  86. -----------------------------
  87. -- acacia wood supported rammed_earth
  88. minetest.register_node('earthbuild:acacia_wood_supported_rammed_earth', {
  89. description = 'Acacia Wood Supported Rammed Earth',
  90. drawtype = "normal",
  91. tiles = {
  92. "earthbuild_rammed_earth.png",
  93. "default_acacia_wood.png",
  94. "earthbuild_acacia_wood_supported_rammed_earth.png",
  95. "earthbuild_acacia_wood_supported_rammed_earth.png",
  96. "earthbuild_acacia_wood_supported_rammed_earth.png",
  97. "earthbuild_acacia_wood_supported_rammed_earth.png"
  98. },
  99. paramtype = "light",
  100. groups = {crumbly = 1, cracky = 3, choppy = 2, flammable=1},
  101. sounds = default.node_sound_dirt_defaults(),
  102. })
  103. -- adds acacia wood supported rammed_earth recipe
  104. minetest.register_craft({
  105. output = 'earthbuild:acacia_wood_supported_rammed_earth 3',
  106. recipe = {
  107. {'earthbuild:rammed_earth', 'earthbuild:rammed_earth', 'earthbuild:rammed_earth'},
  108. {'default:acacia_wood', '', ''},
  109. {'', '', ''},
  110. }
  111. })
  112. ----------------------------
  113. -- aspen wood supported rammed_earth
  114. minetest.register_node('earthbuild:aspen_wood_supported_rammed_earth', {
  115. description = 'Aspen Wood Supported Rammed Earth',
  116. drawtype = "normal",
  117. tiles = {
  118. "earthbuild_rammed_earth.png",
  119. "default_aspen_wood.png",
  120. "earthbuild_aspen_wood_supported_rammed_earth.png",
  121. "earthbuild_aspen_wood_supported_rammed_earth.png",
  122. "earthbuild_aspen_wood_supported_rammed_earth.png",
  123. "earthbuild_aspen_wood_supported_rammed_earth.png"
  124. },
  125. paramtype = "light",
  126. groups = {crumbly = 1, cracky = 3, choppy = 2, flammable=1},
  127. sounds = default.node_sound_dirt_defaults(),
  128. })
  129. -- adds aspen wood supported rammed_earth recipe
  130. minetest.register_craft({
  131. output = 'earthbuild:aspen_wood_supported_rammed_earth 3',
  132. recipe = {
  133. {'earthbuild:rammed_earth', 'earthbuild:rammed_earth', 'earthbuild:rammed_earth'},
  134. {'default:aspen_wood', '', ''},
  135. {'', '', ''},
  136. }
  137. })
  138. --COB
  139. -------------------------------
  140. -- supported cob
  141. minetest.register_node('earthbuild:supported_cob', {
  142. description = 'Supported Cob',
  143. drawtype = "normal",
  144. tiles = {
  145. "earthbuild_cob.png",
  146. "default_wood.png",
  147. "earthbuild_supported_cob.png",
  148. "earthbuild_supported_cob.png",
  149. "earthbuild_supported_cob.png",
  150. "earthbuild_supported_cob.png"
  151. },
  152. paramtype = "light",
  153. groups = {crumbly = 2, cracky = 3, choppy = 2, flammable=1},
  154. sounds = default.node_sound_dirt_defaults(),
  155. })
  156. -- adds supported cob recipe
  157. minetest.register_craft({
  158. output = 'earthbuild:supported_cob 3',
  159. recipe = {
  160. {'earthbuild:cob', 'earthbuild:cob', 'earthbuild:cob'},
  161. {'default:wood', '', ''},
  162. {'', '', ''},
  163. }
  164. })
  165. --------------------------------
  166. -- adds jungle wood supported cob
  167. minetest.register_node('earthbuild:junglewood_supported_cob', {
  168. description = 'Jungle Wood Supported Cob',
  169. drawtype = "normal",
  170. tiles = {
  171. "earthbuild_cob.png",
  172. "default_junglewood.png",
  173. "earthbuild_junglewood_supported_cob.png",
  174. "earthbuild_junglewood_supported_cob.png",
  175. "earthbuild_junglewood_supported_cob.png",
  176. "earthbuild_junglewood_supported_cob.png"
  177. },
  178. paramtype = "light",
  179. groups = {crumbly = 2, cracky = 3, choppy = 2, flammable=1},
  180. sounds = default.node_sound_dirt_defaults(),
  181. })
  182. -- adds jungle wood supported cob recipe
  183. minetest.register_craft({
  184. output = 'earthbuild:junglewood_supported_cob 3',
  185. recipe = {
  186. {'earthbuild:cob', 'earthbuild:cob', 'earthbuild:cob'},
  187. {'default:junglewood', '', ''},
  188. {'', '', ''},
  189. }
  190. })
  191. ------------------------------------
  192. -- adds pine wood supported cob
  193. minetest.register_node('earthbuild:pine_wood_supported_cob', {
  194. description = 'Pine Wood Supported Cob',
  195. drawtype = "normal",
  196. tiles = {
  197. "earthbuild_cob.png",
  198. "default_pine_wood.png",
  199. "earthbuild_pine_wood_supported_cob.png",
  200. "earthbuild_pine_wood_supported_cob.png",
  201. "earthbuild_pine_wood_supported_cob.png",
  202. "earthbuild_pine_wood_supported_cob.png"
  203. },
  204. paramtype = "light",
  205. groups = {crumbly = 2, cracky = 3, choppy = 2, flammable=1},
  206. sounds = default.node_sound_dirt_defaults(),
  207. })
  208. -- adds pine wood supported cob recipe
  209. minetest.register_craft({
  210. output = 'earthbuild:pine_wood_supported_cob 3',
  211. recipe = {
  212. {'earthbuild:cob', 'earthbuild:cob', 'earthbuild:cob'},
  213. {'default:pine_wood', '', ''},
  214. {'', '', ''},
  215. }
  216. })
  217. ---------------------------------
  218. -- acacia wood supported cob
  219. minetest.register_node('earthbuild:acacia_wood_supported_cob', {
  220. description = 'Acacia Wood Supported Cob',
  221. drawtype = "normal",
  222. tiles = {
  223. "earthbuild_cob.png",
  224. "default_acacia_wood.png",
  225. "earthbuild_acacia_wood_supported_cob.png",
  226. "earthbuild_acacia_wood_supported_cob.png",
  227. "earthbuild_acacia_wood_supported_cob.png",
  228. "earthbuild_acacia_wood_supported_cob.png"
  229. },
  230. paramtype = "light",
  231. groups = {crumbly = 2, cracky = 3, choppy = 2, flammable=1},
  232. sounds = default.node_sound_dirt_defaults(),
  233. })
  234. -- adds acacia wood supported cob recipe
  235. minetest.register_craft({
  236. output = 'earthbuild:acacia_wood_supported_cob 3',
  237. recipe = {
  238. {'earthbuild:cob', 'earthbuild:cob', 'earthbuild:cob'},
  239. {'default:acacia_wood', '', ''},
  240. {'', '', ''},
  241. }
  242. })
  243. ----------------------------------
  244. -- aspen wood supported cob
  245. minetest.register_node('earthbuild:aspen_wood_supported_cob', {
  246. description = 'Aspen Wood Supported Cob',
  247. drawtype = "normal",
  248. tiles = {
  249. "earthbuild_cob.png",
  250. "default_aspen_wood.png",
  251. "earthbuild_aspen_wood_supported_cob.png",
  252. "earthbuild_aspen_wood_supported_cob.png",
  253. "earthbuild_aspen_wood_supported_cob.png",
  254. "earthbuild_aspen_wood_supported_cob.png"
  255. },
  256. paramtype = "light",
  257. groups = {crumbly = 2, cracky = 3, choppy = 2, flammable=1},
  258. sounds = default.node_sound_dirt_defaults(),
  259. })
  260. ---------------------------------
  261. -- aspen wood supported cob recipe
  262. minetest.register_craft({
  263. output = 'earthbuild:aspen_wood_supported_cob 3',
  264. recipe = {
  265. {'earthbuild:cob', 'earthbuild:cob', 'earthbuild:cob'},
  266. {'default:aspen_wood', '', ''},
  267. {'', '', ''},
  268. }
  269. })
  270. -----------------------------------------------------------
  271. --THATCH NODES AND CRAFTS
  272. -- adds thatch
  273. minetest.register_node('earthbuild:thatch', {
  274. description = 'Thatch',
  275. drawtype = "normal",
  276. tiles = {"earthbuild_thatch.png"},
  277. paramtype = "light",
  278. drop = "earthbuild:thatch",
  279. groups = {snappy=3, flammable=1},
  280. sounds = default.node_sound_leaves_defaults(),
  281. })
  282. -- adds thatch recipes
  283. minetest.register_craft({
  284. output = 'earthbuild:thatch 6',
  285. recipe = {
  286. {'group:leaves', 'group:leaves', 'group:leaves'},
  287. {'group:leaves', 'group:leaves', 'group:leaves'},
  288. {'group:leaves', 'group:leaves', 'group:leaves'},
  289. }
  290. })
  291. minetest.register_craft({
  292. output = 'earthbuild:thatch 6',
  293. recipe = {
  294. {'group:grass', 'group:grass', 'group:grass'},
  295. {'group:grass', 'group:grass', 'group:grass'},
  296. {'group:grass', 'group:grass', 'group:grass'},
  297. }
  298. })
  299. minetest.register_craft({
  300. output = 'earthbuild:thatch 6',
  301. recipe = {
  302. {'group:dry_grass', 'group:dry_grass', 'group:dry_grass'},
  303. {'group:dry_grass', 'group:dry_grass', 'group:dry_grass'},
  304. {'group:dry_grass', 'group:dry_grass', 'group:dry_grass'},
  305. }
  306. })
  307. minetest.register_craft({
  308. output = 'earthbuild:thatch 6',
  309. recipe = {
  310. {'default:junglegrass', 'default:junglegrass', 'default:junglegrass'},
  311. {'default:junglegrass', 'default:junglegrass', 'default:junglegrass'},
  312. {'default:junglegrass', 'default:junglegrass', 'default:junglegrass'},
  313. }
  314. })
  315. minetest.register_craft({
  316. output = 'earthbuild:thatch 6',
  317. recipe = {
  318. {'default:papyrus', 'default:papyrus', 'default:papyrus'},
  319. {'default:papyrus', 'default:papyrus', 'default:papyrus'},
  320. {'default:papyrus', 'default:papyrus', 'default:papyrus'},
  321. }
  322. })
  323. ----------------------------------------------------------
  324. ----------------------
  325. -- Stick platform
  326. minetest.register_node("earthbuild:stick_platform", {
  327. description = "Stick Platform",
  328. drawtype = "nodebox",
  329. tiles = { "earthbuild_stick_platform_top.png",
  330. "earthbuild_stick_platform_top.png",
  331. "earthbuild_stick_platform_side.png",
  332. "earthbuild_stick_platform_side.png",
  333. "earthbuild_stick_platform_side.png",
  334. "earthbuild_stick_platform_side.png"},
  335. paramtype = "light",
  336. node_box = {
  337. type = "fixed",
  338. fixed = {
  339. {-0.5, 0.375, -0.5, 0.5, 0.501, 0.5},
  340. },
  341. },
  342. selection_box = {
  343. type = "fixed",
  344. fixed = {
  345. {-0.5, 0.375, -0.5, 0.5, 0.501, 0.5},
  346. },
  347. },
  348. groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 1,},
  349. sounds = default.node_sound_wood_defaults(),
  350. })
  351. --recipe for stick platform
  352. minetest.register_craft({
  353. output = 'earthbuild:stick_platform 5',
  354. recipe = {
  355. {'group:stick', '', 'group:stick'},
  356. {'', 'group:stick', ''},
  357. {'group:stick', '', 'group:stick'},
  358. }
  359. })
  360. --recycle stick platform
  361. minetest.register_craft({
  362. output = 'default:stick 5',
  363. recipe = {
  364. {'earthbuild:stick_platform'}
  365. }
  366. })
  367. ----------------------
  368. -- Stick platform with brush
  369. --(this mimics how a mud roof is typically made...
  370. -- cob would go on top. More realistic than the wood supported ones)
  371. minetest.register_node("earthbuild:stick_platform_with_brush", {
  372. description = "Stick Platform with Brush",
  373. drawtype = "nodebox",
  374. tiles = { "earthbuild_thatch.png", "earthbuild_stick_platform_with_brush.png", "earthbuild_stick_platform_with_brush_side.png", "earthbuild_stick_platform_with_brush_side.png", "earthbuild_stick_platform_with_brush_side.png", "earthbuild_stick_platform_with_brush_side.png"},
  375. paramtype = "light",
  376. node_box = {
  377. type = "fixed",
  378. fixed = {
  379. {-0.5, 0.25, -0.5, 0.5, 0.5, 0.5},
  380. },
  381. },
  382. selection_box = {
  383. type = "fixed",
  384. fixed = {
  385. {-0.5, 0.25, -0.5, 0.5, 0.5, 0.5},
  386. },
  387. },
  388. groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 1,},
  389. sounds = default.node_sound_wood_defaults(),
  390. })
  391. --recipe for stick platform with brush
  392. minetest.register_craft({
  393. output = 'earthbuild:stick_platform_with_brush 6',
  394. recipe = {
  395. {'', 'earthbuild:thatch', ''},
  396. {'earthbuild:stick_platform', 'earthbuild:stick_platform', 'earthbuild:stick_platform'},
  397. {'earthbuild:stick_platform', 'earthbuild:stick_platform', 'earthbuild:stick_platform'},
  398. }
  399. })
  400. --recycle stick platform with brush
  401. minetest.register_craft({
  402. output = 'earthbuild:stick_platform',
  403. recipe = {
  404. {'earthbuild:stick_platform_with_brush'}
  405. }
  406. })
  407. ----------------------------------------------------------
  408. --STAIRS AND SLABS NODES
  409. -- Stairs and slab for thatch
  410. stairs.register_stair_and_slab("thatch", "earthbuild:thatch",
  411. {snappy=3, flammable=1},
  412. {"earthbuild_thatch.png"},
  413. "Thatch Stair",
  414. "Thatch Slab",
  415. default.node_sound_leaves_defaults())
  416. ----------------------------------------------
  417. --Burnables
  418. minetest.register_craft({
  419. type = "fuel",
  420. recipe = "earthbuild:thatch",
  421. burntime = 9,
  422. })
  423. minetest.register_craft({
  424. type = "fuel",
  425. recipe = "stairs:stair_thatch",
  426. burntime = 8,
  427. })
  428. minetest.register_craft({
  429. type = "fuel",
  430. recipe = "stairs:slab_thatch",
  431. burntime = 3,
  432. })
  433. minetest.register_craft({
  434. type = "fuel",
  435. recipe = "earthbuild:stick_platform",
  436. burntime = 1.5,
  437. })
  438. minetest.register_craft({
  439. type = "fuel",
  440. recipe = "earthbuild:stick_platform_with_brush",
  441. burntime = 3,
  442. })