kalite_torch.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. minetest.register_node("torches:kalite_torch_floor", {
  2. description = "Kalite Torch\n\nDon't stand on this, it's hot!\nCan burn for several days!\nCan be relit from various sources.",
  3. drawtype = "mesh",
  4. mesh = "torch_floor.obj",
  5. inventory_image = "gloopores_kalite_torch_on_floor.png",
  6. wield_image = "gloopores_kalite_torch_on_floor.png",
  7. tiles = {{
  8. name = "gloopores_kalite_torch_on_floor_animated.png",
  9. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
  10. }},
  11. paramtype = "light",
  12. paramtype2 = "wallmounted",
  13. sunlight_propagates = true,
  14. walkable = false,
  15. liquids_pointable = false,
  16. light_source = 12,
  17. groups = utility.dig_groups("item", {
  18. flammable=1,
  19. attached_node=1,
  20. torch=1,
  21. torch_craftitem=1,
  22. melt_around=2,
  23. notify_construct=1,
  24. want_notify=1,
  25. }),
  26. drop = "torches:kalite_torch_floor",
  27. damage_per_second = 1, -- Torches damage if you stand on top of them.
  28. selection_box = {
  29. type = "wallmounted",
  30. wall_bottom = {-1/16, -0.5, -1/16, 1/16, 2/16, 1/16},
  31. },
  32. sounds = default.node_sound_wood_defaults(),
  33. _torches_node_floor = "torches:kalite_torch_floor",
  34. _torches_node_wall = "torches:kalite_torch_wall",
  35. _torches_node_ceiling = "torches:kalite_torch_ceiling",
  36. on_place = function(...)
  37. return torches.put_torch(...)
  38. end,
  39. floodable = true,
  40. on_rotate = false,
  41. on_flood = function(pos, oldnode, newnode)
  42. minetest.add_node(pos, {name="air"})
  43. minetest.sound_play("real_torch_extinguish", {pos=pos, max_hear_distance=16, gain=1})
  44. return true
  45. end,
  46. on_construct = function(pos)
  47. breath.ignite_nearby_gas(pos)
  48. flowers.create_lilyspawner_near(pos)
  49. torchmelt.start_melting(pos)
  50. real_torch.start_kalite_timer(pos)
  51. end,
  52. on_notify = function(pos, other)
  53. torchmelt.start_melting(pos)
  54. end,
  55. on_destruct = function(pos)
  56. end,
  57. })
  58. minetest.register_node("torches:kalite_torch_wall", {
  59. drawtype = "mesh",
  60. mesh = "torch_wall.obj",
  61. tiles = {{
  62. name = "gloopores_kalite_torch_on_floor_animated.png",
  63. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
  64. }},
  65. paramtype = "light",
  66. paramtype2 = "wallmounted",
  67. sunlight_propagates = true,
  68. walkable = false,
  69. light_source = 12,
  70. groups = utility.dig_groups("item", {
  71. flammable=1,
  72. not_in_creative_inventory=1,
  73. attached_node=1,
  74. torch=1,
  75. melt_around=2,
  76. notify_construct=1,
  77. want_notify=1,
  78. }),
  79. drop = "torches:kalite_torch_floor",
  80. selection_box = {
  81. type = "wallmounted",
  82. wall_side = {-0.5, -0.3, -0.1, -0.2, 0.3, 0.1},
  83. },
  84. sounds = default.node_sound_wood_defaults(),
  85. floodable = true,
  86. on_rotate = false,
  87. on_flood = function(pos, oldnode, newnode)
  88. minetest.add_node(pos, {name="air"})
  89. minetest.sound_play("real_torch_extinguish", {pos=pos, max_hear_distance=16, gain=1})
  90. return true
  91. end,
  92. on_construct = function(pos)
  93. breath.ignite_nearby_gas(pos)
  94. flowers.create_lilyspawner_near(pos)
  95. torchmelt.start_melting(pos)
  96. real_torch.start_kalite_timer(pos)
  97. end,
  98. on_notify = function(pos, other)
  99. torchmelt.start_melting(pos)
  100. end,
  101. on_destruct = function(pos)
  102. end,
  103. })
  104. minetest.register_node("torches:kalite_torch_ceiling", {
  105. drawtype = "mesh",
  106. mesh = "torch_ceiling.obj",
  107. tiles = {{
  108. name = "gloopores_kalite_torch_on_floor_animated.png",
  109. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
  110. }},
  111. paramtype = "light",
  112. paramtype2 = "wallmounted",
  113. sunlight_propagates = true,
  114. walkable = false,
  115. light_source = 12,
  116. groups = utility.dig_groups("item", {
  117. flammable=1,
  118. not_in_creative_inventory=1,
  119. attached_node=1,
  120. torch=1,
  121. melt_around=2,
  122. notify_construct=1,
  123. want_notify=1,
  124. }),
  125. drop = "torches:kalite_torch_floor",
  126. selection_box = {
  127. type = "wallmounted",
  128. wall_top = {-0.1, -0.1, -0.25, 0.1, 0.5, 0.1},
  129. },
  130. sounds = default.node_sound_wood_defaults(),
  131. floodable = true,
  132. on_rotate = false,
  133. on_flood = function(pos, oldnode, newnode)
  134. minetest.add_node(pos, {name="air"})
  135. minetest.sound_play("real_torch_extinguish", {pos=pos, max_hear_distance=16, gain=1})
  136. return true
  137. end,
  138. on_construct = function(pos)
  139. breath.ignite_nearby_gas(pos)
  140. flowers.create_lilyspawner_near(pos)
  141. torchmelt.start_melting(pos)
  142. real_torch.start_kalite_timer(pos)
  143. end,
  144. on_notify = function(pos, other)
  145. torchmelt.start_melting(pos)
  146. end,
  147. on_destruct = function(pos)
  148. end,
  149. })
  150. minetest.register_craft({
  151. output = 'torches:kalite_torch_floor 4',
  152. recipe = {
  153. {'kalite:lump'},
  154. {'group:stick'},
  155. }
  156. })
  157. minetest.register_craft({
  158. type = "fuel",
  159. recipe = "torches:kalite_torch_floor",
  160. burntime = 4,
  161. })