perma_ktorch.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. minetest.register_node("torches:perma_ktorch_floor", {
  2. description = "Everlasting Kalite Torch",
  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:perma_ktorch_floor",
  27. damage_per_second = 1*500, -- Torches damage if you stand on top of them.
  28. _damage_per_second_type = "heat",
  29. _death_message = {
  30. "<player> stepped on a red torch.",
  31. "<player> stepped on burning kalite.",
  32. },
  33. selection_box = {
  34. type = "wallmounted",
  35. wall_bottom = {-1/16, -0.5, -1/16, 1/16, 2/16, 1/16},
  36. },
  37. sounds = default.node_sound_wood_defaults(),
  38. _torches_node_floor = "torches:perma_ktorch_floor",
  39. _torches_node_wall = "torches:perma_ktorch_wall",
  40. _torches_node_ceiling = "torches:perma_ktorch_ceiling",
  41. on_place = function(...)
  42. return torches.put_torch(...)
  43. end,
  44. --[[
  45. on_use = function(...)
  46. return torches.on_use(...)
  47. end,
  48. --]]
  49. floodable = true,
  50. on_rotate = false,
  51. on_flood = function(pos, oldnode, newnode)
  52. minetest.add_node(pos, {name="air"})
  53. minetest.sound_play("real_torch_extinguish", {pos=pos, max_hear_distance=16, gain=1}, true)
  54. return true
  55. end,
  56. on_construct = function(pos)
  57. breath.ignite_nearby_gas(pos)
  58. flowers.create_lilyspawner_near(pos)
  59. torchmelt.start_melting(pos)
  60. end,
  61. on_notify = function(pos, other)
  62. torchmelt.start_melting(pos)
  63. end,
  64. on_destruct = function(pos)
  65. end,
  66. })
  67. minetest.register_node("torches:perma_ktorch_wall", {
  68. drawtype = "mesh",
  69. mesh = "torch_wall.obj",
  70. tiles = {{
  71. name = "gloopores_kalite_torch_on_floor_animated.png",
  72. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
  73. }},
  74. paramtype = "light",
  75. paramtype2 = "wallmounted",
  76. sunlight_propagates = true,
  77. walkable = false,
  78. light_source = 12,
  79. groups = utility.dig_groups("item", {
  80. flammable=1,
  81. not_in_creative_inventory=1,
  82. attached_node=1,
  83. torch=1,
  84. melt_around=2,
  85. notify_construct=1,
  86. want_notify=1,
  87. }),
  88. drop = "torches:perma_ktorch_floor",
  89. selection_box = {
  90. type = "wallmounted",
  91. wall_side = {-0.5, -0.3, -0.1, -0.2, 0.3, 0.1},
  92. },
  93. sounds = default.node_sound_wood_defaults(),
  94. floodable = true,
  95. on_rotate = false,
  96. on_flood = function(pos, oldnode, newnode)
  97. minetest.add_node(pos, {name="air"})
  98. minetest.sound_play("real_torch_extinguish", {pos=pos, max_hear_distance=16, gain=1}, true)
  99. return true
  100. end,
  101. on_construct = function(pos)
  102. breath.ignite_nearby_gas(pos)
  103. flowers.create_lilyspawner_near(pos)
  104. torchmelt.start_melting(pos)
  105. end,
  106. on_notify = function(pos, other)
  107. torchmelt.start_melting(pos)
  108. end,
  109. on_destruct = function(pos)
  110. end,
  111. })
  112. minetest.register_node("torches:perma_ktorch_ceiling", {
  113. drawtype = "mesh",
  114. mesh = "torch_ceiling.obj",
  115. tiles = {{
  116. name = "gloopores_kalite_torch_on_floor_animated.png",
  117. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
  118. }},
  119. paramtype = "light",
  120. paramtype2 = "wallmounted",
  121. sunlight_propagates = true,
  122. walkable = false,
  123. light_source = 12,
  124. groups = utility.dig_groups("item", {
  125. flammable=1,
  126. not_in_creative_inventory=1,
  127. attached_node=1,
  128. torch=1,
  129. melt_around=2,
  130. notify_construct=1,
  131. want_notify=1,
  132. }),
  133. drop = "torches:perma_ktorch_floor",
  134. selection_box = {
  135. type = "wallmounted",
  136. wall_top = {-0.1, -0.1, -0.25, 0.1, 0.5, 0.1},
  137. },
  138. sounds = default.node_sound_wood_defaults(),
  139. floodable = true,
  140. on_rotate = false,
  141. on_flood = function(pos, oldnode, newnode)
  142. minetest.add_node(pos, {name="air"})
  143. minetest.sound_play("real_torch_extinguish", {pos=pos, max_hear_distance=16, gain=1}, true)
  144. return true
  145. end,
  146. on_construct = function(pos)
  147. breath.ignite_nearby_gas(pos)
  148. flowers.create_lilyspawner_near(pos)
  149. torchmelt.start_melting(pos)
  150. end,
  151. on_notify = function(pos, other)
  152. torchmelt.start_melting(pos)
  153. end,
  154. on_destruct = function(pos)
  155. end,
  156. })
  157. minetest.register_craft({
  158. output = 'torches:perma_ktorch_floor 2',
  159. recipe = {
  160. {'mese_crystals:zentamine'},
  161. {'kalite:lump'},
  162. {'group:stick'},
  163. }
  164. })
  165. minetest.register_craft({
  166. type = "fuel",
  167. recipe = "torches:perma_ktorch_floor",
  168. burntime = 4,
  169. })