glass.lua 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. --[[
  2. Medival glasses.
  3. The glasses can be colorized using dye.
  4. Colorization requires unifieddyes installed.
  5. Special thanks to Semmett9 for the glass textures.
  6. ]]
  7. --[[ Rhombus Glass ]]
  8. minetest.register_node("darkage:glass", {
  9. description = "Clean Medieval Glass",
  10. drawtype = "glasslike",
  11. tiles = {"darkage_glass.png"},
  12. use_texture_alpha=false,
  13. paramtype = "light",
  14. sunlight_propagates = true,
  15. groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1},
  16. sounds = default.node_sound_glass_defaults(),
  17. })
  18. minetest.register_craft({
  19. output = "darkage:glass 8",
  20. recipe = {
  21. {"default:glass", "default:steel_ingot", "default:glass"},
  22. {"default:steel_ingot", "default:glass", "default:steel_ingot"},
  23. {"default:glass", "default:steel_ingot", "default:glass"},
  24. }
  25. })
  26. --[[ Round Glass By Semmett9 aka Infinatum ]]
  27. minetest.register_node("darkage:glass_round", {
  28. description = "Round Glass",
  29. drawtype = "glasslike",
  30. tiles = { "darkage_glass_round.png" },
  31. paramtype = "light",
  32. use_texture_alpha = true,
  33. sunlight_propagates = true,
  34. sounds = default.node_sound_glass_defaults(),
  35. groups = {cracky=3,oddly_breakable_by_hand=3, not_cuttable=1},
  36. })
  37. minetest.register_craft({
  38. output = "darkage:glass_round 8",
  39. recipe = {
  40. {"default:steel_ingot", "default:glass", "default:steel_ingot"},
  41. {"default:glass", "default:glass", "default:glass"},
  42. {"default:steel_ingot", "default:glass", "default:steel_ingot"},
  43. }
  44. })
  45. --[[ Square glass By Semmett9 aka Infinatum ]]
  46. minetest.register_node("darkage:glass_square", {
  47. description = "Square Glass",
  48. drawtype = "glasslike",
  49. tiles = { "darkage_glass_square.png" },
  50. paramtype = "light",
  51. use_texture_alpha = true,
  52. sunlight_propagates = true,
  53. sounds = default.node_sound_glass_defaults(),
  54. groups = {cracky=3,oddly_breakable_by_hand=3, not_cuttable=1},
  55. })
  56. minetest.register_craft({
  57. output = "darkage:glass_square 8",
  58. recipe = {
  59. {"default:glass", "default:steel_ingot", "default:glass"},
  60. {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
  61. {"default:glass", "default:steel_ingot", "default:glass"},
  62. }
  63. })
  64. --[[
  65. Glowing Glass Variants
  66. ]]
  67. --[[ Rhombus Glow Glass ]]
  68. minetest.register_node("darkage:glow_glass", {
  69. description = "Medieval Glow Glass",
  70. drawtype = "glasslike",
  71. tiles = {"darkage_glass.png"},
  72. use_texture_alpha=true,
  73. paramtype = "light",
  74. sunlight_propagates = true,
  75. light_source = default.LIGHT_MAX-3,
  76. groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1},
  77. sounds = default.node_sound_glass_defaults(),
  78. inventory_image = minetest.inventorycube("darkage_glow_glass.png")
  79. })
  80. minetest.register_craft({
  81. output = "darkage:glow_glass 1",
  82. type = "shaped",
  83. recipe = {
  84. {"darkage:glass"},
  85. {"default:torch"}
  86. }
  87. })
  88. -- Recycling
  89. minetest.register_craft({
  90. output = "darkage:glass 1",
  91. type = "shaped",
  92. recipe = {{"darkage:glow_glass"}},
  93. })
  94. --[[ Round Glow Glass ]]
  95. minetest.register_node("darkage:glow_glass_round", {
  96. description = "Medieval Round Glow Glass",
  97. drawtype = "glasslike",
  98. tiles = {"darkage_glass_round.png"},
  99. use_texture_alpha=true,
  100. paramtype = "light",
  101. sunlight_propagates = true,
  102. light_source = default.LIGHT_MAX-3,
  103. groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1},
  104. sounds = default.node_sound_glass_defaults(),
  105. inventory_image = minetest.inventorycube("darkage_glow_glass_round.png")
  106. })
  107. minetest.register_craft({
  108. output = "darkage:glow_glass_round 1",
  109. type = "shaped",
  110. recipe = {
  111. {"darkage:glass_round"},
  112. {"default:torch"}
  113. }
  114. })
  115. -- Recycling
  116. minetest.register_craft({
  117. output = "darkage:glass_round 1",
  118. recipe = {{"darkage:glow_glass_round"}}
  119. })
  120. --]] Square Glow Glass ]]
  121. minetest.register_node("darkage:glow_glass_square", {
  122. description = "Medieval Square Glow Glass",
  123. drawtype = "glasslike",
  124. tiles = {"darkage_glass_square.png"},
  125. use_texture_alpha=true,
  126. paramtype = "light",
  127. sunlight_propagates = true,
  128. light_source = default.LIGHT_MAX-3,
  129. groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1},
  130. sounds = default.node_sound_glass_defaults(),
  131. inventory_image = minetest.inventorycube("darkage_glow_glass_square.png")
  132. })
  133. minetest.register_craft({
  134. output = "darkage:glow_glass_square 1",
  135. type = "shaped",
  136. recipe = {
  137. {"darkage:glass_square"},
  138. {"default:torch"},
  139. }
  140. })
  141. --Recycling
  142. minetest.register_craft({
  143. output = "darkage:glass_square 1",
  144. recipe = {{"darkage:glow_glass_square"}}
  145. })
  146. --[[
  147. Colorizable Milk Glass Variants, depending on unifieddyes mod
  148. ]]
  149. if minetest.get_modpath("unifieddyes") then
  150. --[[ Rhombus Milk Glass ]]
  151. minetest.register_node("darkage:milk_glass", {
  152. description = "Milky Medieval Glass (Good for colorization)",
  153. drawtype = "glasslike",
  154. tiles = {"darkage_milk_glass.png"},
  155. use_texture_alpha=true,
  156. paramtype = "light",
  157. paramtype2 = "color",
  158. palette = "unifieddyes_palette_extended.png",
  159. sunlight_propagates = true,
  160. groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1},
  161. sounds = default.node_sound_glass_defaults()
  162. })
  163. minetest.register_craft({
  164. output = "darkage:milk_glass",
  165. type = "shapeless",
  166. recipe = {"darkage:glass", "dye:white"}
  167. })
  168. unifieddyes.register_color_craft({
  169. output = "darkage:milk_glass",
  170. palette = "extended",
  171. type = "shapeless",
  172. neutral_node = "",
  173. recipe = {
  174. "darkage:milk_glass",
  175. "MAIN_DYE"
  176. }
  177. })
  178. -- Recycling
  179. minetest.register_craft({
  180. output = "darkage:glass 1",
  181. recipe = {{"darkage:milk_glass"}}
  182. })
  183. --[[ Round Milk Glass ]]
  184. minetest.register_node("darkage:milk_glass_round", {
  185. description = "Milky Medieval Round Glass (Good for colorization)",
  186. drawtype = "glasslike",
  187. tiles = {"darkage_milk_glass_round.png"},
  188. use_texture_alpha=true,
  189. paramtype = "light",
  190. paramtype2 = "color",
  191. palette = "unifieddyes_palette_extended.png",
  192. sunlight_propagates = true,
  193. groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1},
  194. sounds = default.node_sound_glass_defaults()
  195. })
  196. -- Craft
  197. minetest.register_craft({
  198. output = "darkage:milk_glass_round",
  199. type = "shapeless",
  200. recipe = {"darkage:glass_round", "dye:white"},
  201. })
  202. unifieddyes.register_color_craft({
  203. output = "darkage:milk_glass_round",
  204. palette = "extended",
  205. type = "shapeless",
  206. neutral_node = "",
  207. recipe = {
  208. "darkage:milk_glass_round",
  209. "MAIN_DYE"
  210. }
  211. })
  212. -- Recycling
  213. minetest.register_craft({
  214. output = "darkage:glass_round 1",
  215. recipe = {{"darkage:milk_glass_round"}}
  216. })
  217. --[[ Square Milk Glass ]]
  218. minetest.register_node("darkage:milk_glass_square", {
  219. description = "Milky Medieval Square Glass (Good for colorization)",
  220. drawtype = "glasslike",
  221. tiles = {"darkage_milk_glass_square.png"},
  222. use_texture_alpha=true,
  223. paramtype = "light",
  224. paramtype2 = "color",
  225. palette = "unifieddyes_palette_extended.png",
  226. sunlight_propagates = true,
  227. groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1},
  228. sounds = default.node_sound_glass_defaults()
  229. })
  230. -- Craft
  231. minetest.register_craft({
  232. output = "darkage:milk_glass_square",
  233. type = "shapeless",
  234. recipe = {"darkage:glass_square", "dye:white"},
  235. })
  236. unifieddyes.register_color_craft({
  237. output = "darkage:milk_glass_square",
  238. palette = "extended",
  239. type = "shapeless",
  240. neutral_node = "",
  241. recipe = {
  242. "darkage:stained_milk_glass_square",
  243. "MAIN_DYE"
  244. }
  245. })
  246. -- Recycling
  247. minetest.register_craft({
  248. output = "darkage:glass_square",
  249. recipe = {{"darkage:milk_glass_square"}}
  250. })
  251. end --unifieddyes condition