whitewash.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. ----------------------------------------------------------
  2. -- Whitewash
  3. -- Coloring added to surfaces
  4. --historically used for aesthetics, durability, hygiene
  5. -------------------------------------------------
  6. --Note on crafting:
  7. -- made from slaked lime (+ optional additives)
  8. --slaked lime is from quicklime mixed with water
  9. -- quicklime is made by burning limestone
  10. --...and limestone is not currently in the game.
  11. --(but coral is, and limestone rocks could be found in gravel).
  12. --Note on crafting ratios:
  13. --control ratio at cooking stage. More lime rich -> more quicklime.
  14. --wash is spread thin...
  15. --so one block of pure lime (e.g. coral) covers many. 18?
  16. --assume gravel is 1/3rd limestone.
  17. --Note on digging strength:
  18. --cures to limestone (sort of), so give a boost to digging strength
  19. -- {crumbly = 1, cracky = 2}
  20. -- makes it like stone. Gives a reason for making it, other than aesthetics
  21. ----------------------------------------------------
  22. ---------------------------------------------
  23. --Sourcing The Whitewash itself
  24. --Quicklime
  25. minetest.register_craftitem("earthbuild:quicklime", {
  26. description = "Quicklime",
  27. inventory_image = "earthbuild_quicklime.png",
  28. stack_max = 99,
  29. })
  30. --Whitewash (technically Slaked lime)
  31. minetest.register_craftitem("earthbuild:whitewash", {
  32. description = "Whitewash",
  33. inventory_image = "earthbuild_whitewash.png",
  34. stack_max = 99,
  35. })
  36. ----------------
  37. --Cooking to get quicklime
  38. --Cook coral to give quicklime
  39. minetest.register_craft({
  40. type = "cooking",
  41. output = "earthbuild:quicklime 9",
  42. recipe = "default:coral_skeleton",
  43. cooktime = 3,
  44. })
  45. ----------------------
  46. --Slake the quicklime in water to make whitewash
  47. --with clay pots
  48. minetest.register_craft({
  49. output = 'earthbuild:whitewash 6',
  50. recipe = {
  51. {'earthbuild:quicklime','earthbuild:quicklime','earthbuild:quicklime'},
  52. {'earthbuild:quicklime','earthbuild:quicklime','earthbuild:quicklime'},
  53. {'','earthbuild:clay_pot_water',''},
  54. },
  55. replacements = {{"earthbuild:clay_pot_water", "earthbuild:clay_pot"}}
  56. })
  57. minetest.register_craft({
  58. output = 'earthbuild:whitewash 6',
  59. recipe = {
  60. {'earthbuild:quicklime','earthbuild:quicklime','earthbuild:quicklime'},
  61. {'earthbuild:quicklime','earthbuild:quicklime','earthbuild:quicklime'},
  62. {'','earthbuild:clay_pot_river_water',''},
  63. },
  64. replacements = {{"earthbuild:clay_pot_river_water", "earthbuild:clay_pot"}}
  65. })
  66. --with default buckets
  67. minetest.register_craft({
  68. output = 'earthbuild:whitewash 6',
  69. recipe = {
  70. {'earthbuild:quicklime','earthbuild:quicklime','earthbuild:quicklime'},
  71. {'earthbuild:quicklime','earthbuild:quicklime','earthbuild:quicklime'},
  72. {'','bucket:bucket_water',''},
  73. },
  74. replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
  75. })
  76. minetest.register_craft({
  77. output = 'earthbuild:whitewash 6',
  78. recipe = {
  79. {'earthbuild:quicklime','earthbuild:quicklime','earthbuild:quicklime'},
  80. {'earthbuild:quicklime','earthbuild:quicklime','earthbuild:quicklime'},
  81. {'','bucket:bucket_river_water',''},
  82. },
  83. replacements = {{"bucket:bucket_river_water", "bucket:bucket_empty"}}
  84. })
  85. --------------------------------------------------------------
  86. --WHITEWASH NODES AND CRAFTS
  87. --------------------------------------
  88. --Wattle and Daub
  89. minetest.register_node('earthbuild:whitewashed_wattle_and_daub', {
  90. description = 'Whitewashed Wattle and Daub',
  91. drawtype = "nodebox",
  92. node_box = {
  93. type = "connected",
  94. fixed = {{-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}},
  95. -- connect_bottom =
  96. connect_front = {{-1/4, -1/2, -1/2, 1/4, 1/2, -1/4}},
  97. connect_left = {{-1/2, -1/2, -1/4, -1/4, 1/2, 1/4}},
  98. connect_back = {{-1/4, -1/2, 1/4, 1/4, 1/2, 1/2}},
  99. connect_right = {{ 1/4, -1/2, -1/4, 1/2, 1/2, 1/4}},
  100. },
  101. connects_to = { "group:crumbly", "group:wood", "group:tree", "group:stone", 'earthbuild:wattle', 'earthbuild:wattle_loose'},
  102. paramtype = "light",
  103. tiles = {"earthbuild_whitewashed_earth.png"},
  104. inventory_image = "earthbuild_whitewashed_earth.png",
  105. wield_image = "earthbuild_whitewashed_earth.png",
  106. groups = {crumbly = 1, cracky = 2, choppy = 2},
  107. sounds = default.node_sound_dirt_defaults(),
  108. })
  109. -- adds whitewashed_wattle_and_daub recipes
  110. minetest.register_craft({
  111. output = 'earthbuild:whitewashed_wattle_and_daub',
  112. recipe = {
  113. {'earthbuild:wattle_and_daub', 'earthbuild:whitewash'},
  114. }
  115. })
  116. --------------------------------------
  117. -- Mud brick
  118. minetest.register_node('earthbuild:whitewashed_mud_brick', {
  119. description = 'Whitewashed Mud Brick',
  120. drawtype = "normal",
  121. tiles = {"earthbuild_whitewashed_earth.png"},
  122. paramtype = "light",
  123. groups = {crumbly = 1, cracky = 2},
  124. sounds = default.node_sound_dirt_defaults(),
  125. })
  126. -- adds whitewashed_mud_brick recipes
  127. minetest.register_craft({
  128. output = 'earthbuild:whitewashed_mud_brick',
  129. recipe = {
  130. {'earthbuild:mud_brick', 'earthbuild:whitewash'},
  131. }
  132. })
  133. ------------------------------------------
  134. -- Earth (both from cob and rammed earth...as they end up indistinguishable)
  135. minetest.register_node('earthbuild:whitewashed_earth', {
  136. description = 'Whitewashed Earth',
  137. drawtype = "normal",
  138. tiles = {"earthbuild_whitewashed_earth.png"},
  139. paramtype = "light",
  140. groups = {crumbly = 1, cracky = 2, falling_node = 1},
  141. sounds = default.node_sound_dirt_defaults(),
  142. })
  143. -- adds whitewashed_earth recipes
  144. minetest.register_craft({
  145. output = 'earthbuild:whitewashed_earth',
  146. recipe = {
  147. {'earthbuild:cob', 'earthbuild:whitewash'},
  148. }
  149. })
  150. minetest.register_craft({
  151. output = 'earthbuild:whitewashed_earth',
  152. recipe = {
  153. {'earthbuild:rammed_earth', 'earthbuild:whitewash'},
  154. }
  155. })
  156. --------------------------------------------
  157. -- Supported Earth Roof
  158. -----------
  159. -- supported earth
  160. minetest.register_node('earthbuild:supported_whitewashed_earth', {
  161. description = 'Supported Whitewashed Earth',
  162. drawtype = "normal",
  163. tiles = {
  164. "earthbuild_whitewashed_earth.png",
  165. "default_wood.png",
  166. "earthbuild_supported_whitewashed_earth.png",
  167. "earthbuild_supported_whitewashed_earth.png",
  168. "earthbuild_supported_whitewashed_earth.png",
  169. "earthbuild_supported_whitewashed_earth.png"
  170. },
  171. paramtype = "light",
  172. groups = {crumbly = 1, cracky = 2, choppy = 2, flammable=1},
  173. sounds = default.node_sound_dirt_defaults(),
  174. })
  175. -- adds supported whitewashed_earth recipes
  176. minetest.register_craft({
  177. output = 'earthbuild:supported_whitewashed_earth',
  178. recipe = {
  179. {'earthbuild:supported_rammed_earth', 'earthbuild:whitewash'},
  180. }
  181. })
  182. minetest.register_craft({
  183. output = 'earthbuild:supported_whitewashed_earth',
  184. recipe = {
  185. {'earthbuild:supported_cob', 'earthbuild:whitewash'},
  186. }
  187. })
  188. minetest.register_craft({
  189. output = 'earthbuild:supported_whitewashed_earth 3',
  190. recipe = {
  191. {'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth'},
  192. {'default:wood', '', ''},
  193. {'', '', ''},
  194. }
  195. })
  196. -----------------------------
  197. -- jungle wood supported earth
  198. minetest.register_node('earthbuild:junglewood_supported_whitewashed_earth', {
  199. description = 'Jungle Wood Supported Whitewashed Earth',
  200. drawtype = "normal",
  201. tiles = {
  202. "earthbuild_whitewashed_earth.png",
  203. "default_junglewood.png",
  204. "earthbuild_junglewood_supported_whitewashed_earth.png",
  205. "earthbuild_junglewood_supported_whitewashed_earth.png",
  206. "earthbuild_junglewood_supported_whitewashed_earth.png",
  207. "earthbuild_junglewood_supported_whitewashed_earth.png"
  208. },
  209. paramtype = "light",
  210. groups = {crumbly = 1, cracky = 2, choppy = 2, flammable=1},
  211. sounds = default.node_sound_dirt_defaults(),
  212. })
  213. -- adds junglewood supported whitewashed_earth recipes
  214. minetest.register_craft({
  215. output = 'earthbuild:junglewood_supported_whitewashed_earth',
  216. recipe = {
  217. {'earthbuild:junglewood_supported_rammed_earth', 'earthbuild:whitewash'},
  218. }
  219. })
  220. minetest.register_craft({
  221. output = 'earthbuild:junglewood_supported_whitewashed_earth',
  222. recipe = {
  223. {'earthbuild:junglewood_supported_cob', 'earthbuild:whitewash'},
  224. }
  225. })
  226. minetest.register_craft({
  227. output = 'earthbuild:junglewood_supported_whitewashed_earth 3',
  228. recipe = {
  229. {'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth'},
  230. {'default:junglewood', '', ''},
  231. {'', '', ''},
  232. }
  233. })
  234. ------------------------------------
  235. -- pine wood supported earth
  236. minetest.register_node('earthbuild:pine_wood_supported_whitewashed_earth', {
  237. description = 'Pine Wood Supported Whitewashed Earth',
  238. drawtype = "normal",
  239. tiles = {
  240. "earthbuild_whitewashed_earth.png",
  241. "default_pine_wood.png",
  242. "earthbuild_pine_wood_supported_whitewashed_earth.png",
  243. "earthbuild_pine_wood_supported_whitewashed_earth.png",
  244. "earthbuild_pine_wood_supported_whitewashed_earth.png",
  245. "earthbuild_pine_wood_supported_whitewashed_earth.png"
  246. },
  247. paramtype = "light",
  248. groups = {crumbly = 1, cracky = 2, choppy = 2, flammable=1},
  249. sounds = default.node_sound_dirt_defaults(),
  250. })
  251. -- adds pine wood supported whitewashed_earth recipes
  252. minetest.register_craft({
  253. output = 'earthbuild:pine_wood_supported_whitewashed_earth',
  254. recipe = {
  255. {'earthbuild:pine_wood_supported_rammed_earth', 'earthbuild:whitewash'},
  256. }
  257. })
  258. minetest.register_craft({
  259. output = 'earthbuild:pine_wood_supported_whitewashed_earth',
  260. recipe = {
  261. {'earthbuild:pine_wood_supported_cob', 'earthbuild:whitewash'},
  262. }
  263. })
  264. minetest.register_craft({
  265. output = 'earthbuild:pine_wood_supported_whitewashed_earth 3',
  266. recipe = {
  267. {'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth'},
  268. {'default:pine_wood', '', ''},
  269. {'', '', ''},
  270. }
  271. })
  272. -------------------------------
  273. -- acacia wood supported earth
  274. minetest.register_node('earthbuild:acacia_wood_supported_whitewashed_earth', {
  275. description = 'Acacia Wood Supported Whitewashed Earth',
  276. drawtype = "normal",
  277. tiles = {
  278. "earthbuild_whitewashed_earth.png",
  279. "default_acacia_wood.png",
  280. "earthbuild_acacia_wood_supported_whitewashed_earth.png",
  281. "earthbuild_acacia_wood_supported_whitewashed_earth.png",
  282. "earthbuild_acacia_wood_supported_whitewashed_earth.png",
  283. "earthbuild_acacia_wood_supported_whitewashed_earth.png"
  284. },
  285. paramtype = "light",
  286. groups = {crumbly = 1, cracky = 2, choppy = 2, flammable=1},
  287. sounds = default.node_sound_dirt_defaults(),
  288. })
  289. -- adds acacia wood supported whitewashed_earth recipes
  290. minetest.register_craft({
  291. output = 'earthbuild:acacia_wood_supported_whitewashed_earth',
  292. recipe = {
  293. {'earthbuild:acacia_wood_supported_rammed_earth', 'earthbuild:whitewash'},
  294. }
  295. })
  296. minetest.register_craft({
  297. output = 'earthbuild:acacia_wood_supported_whitewashed_earth',
  298. recipe = {
  299. {'earthbuild:acacia_wood_supported_cob', 'earthbuild:whitewash'},
  300. }
  301. })
  302. minetest.register_craft({
  303. output = 'earthbuild:acacia_wood_supported_whitewashed_earth 3',
  304. recipe = {
  305. {'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth'},
  306. {'default:acacia_wood', '', ''},
  307. {'', '', ''},
  308. }
  309. })
  310. -----------------------------------------------
  311. -- aspen wood supported earth
  312. minetest.register_node('earthbuild:aspen_wood_supported_whitewashed_earth', {
  313. description = 'Aspen Wood Supported Whitewashed Earth',
  314. drawtype = "normal",
  315. tiles = {
  316. "earthbuild_whitewashed_earth.png",
  317. "default_aspen_wood.png",
  318. "earthbuild_aspen_wood_supported_whitewashed_earth.png",
  319. "earthbuild_aspen_wood_supported_whitewashed_earth.png",
  320. "earthbuild_aspen_wood_supported_whitewashed_earth.png",
  321. "earthbuild_aspen_wood_supported_whitewashed_earth.png"
  322. },
  323. paramtype = "light",
  324. groups = {crumbly = 1, cracky = 2, choppy = 2, flammable=1},
  325. sounds = default.node_sound_dirt_defaults(),
  326. })
  327. -- adds aspen wood supported whitewashed_earth recipes
  328. minetest.register_craft({
  329. output = 'earthbuild:aspen_wood_supported_whitewashed_earth',
  330. recipe = {
  331. {'earthbuild:aspen_wood_supported_rammed_earth', 'earthbuild:whitewash'},
  332. }
  333. })
  334. minetest.register_craft({
  335. output = 'earthbuild:aspen_wood_supported_whitewashed_earth',
  336. recipe = {
  337. {'earthbuild:aspen_wood_supported_cob', 'earthbuild:whitewash'},
  338. }
  339. })
  340. minetest.register_craft({
  341. output = 'earthbuild:aspen_wood_supported_whitewashed_earth 3',
  342. recipe = {
  343. {'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth', 'earthbuild:whitewashed_earth'},
  344. {'default:aspen_wood', '', ''},
  345. {'', '', ''},
  346. }
  347. })
  348. ------------------------------------------
  349. --STRAW-BALE
  350. minetest.register_node('earthbuild:whitewashed_strawbale', {
  351. description = 'Whitewashed Straw-bale Wall',
  352. drawtype = "normal",
  353. tiles = {"earthbuild_whitewashed_earth.png"},
  354. paramtype = "light",
  355. --drop = "default:dirt",
  356. groups = {crumbly = 1, snappy = 1, falling_node = 1},
  357. sounds = default.node_sound_dirt_defaults(),
  358. })
  359. minetest.register_craft({
  360. output = 'earthbuild:whitewashed_strawbale',
  361. recipe = {
  362. {'earthbuild:strawbale', 'earthbuild:whitewash'},
  363. }
  364. })
  365. ----------------------------------------------
  366. --STAIRS and SLABS
  367. -- Stairs and slab for whitewashed_earth
  368. stairs.register_stair_and_slab("whitewashed_earth", "earthbuild:whitewashed_earth",
  369. {crumbly = 1, cracky = 2, falling_node = 1},
  370. {"earthbuild_whitewashed_earth.png"},
  371. "Whitewashed Earth Stair",
  372. "Whitewashed Earth Slab",
  373. default.node_sound_dirt_defaults())
  374. -- Stairs and slab for whitewashed_mud_brick
  375. stairs.register_stair_and_slab("whitewashed_mud_brick", "earthbuild:whitewashed_mud_brick",
  376. {crumbly = 1, cracky = 2},
  377. {"earthbuild_whitewashed_earth.png"},
  378. "Whitewashed Earth Stair",
  379. "Whitewashed Earth Slab",
  380. default.node_sound_dirt_defaults())