Advertisement
Guest User

starting at line 107

a guest
Jun 26th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.25 KB | None | 0 0
  1. minetest.register_node("fireplace:fireplace_01", {
  2.     description = "Fireplace 01",
  3.     drawtype = "mesh",
  4.     mesh = "fireplace.obj",
  5.     inventory_image = minetest.inventorycube("fireplace_01_top.png", "fireplace_01_side.png", "fireplace_01_front.png"),
  6.     wield_image = "fireplace_01_front.png",
  7.     tiles = {
  8.         "fireplace_01_top.png", "fireplace_01_bottom.png",
  9.         "fireplace_01_side.png", "fireplace_01_side.png",
  10.         "fireplace_01_front.png", "fireplace_01_side.png"},
  11.     paramtype = "light",
  12.     paramtype2 = "facedir",
  13.     legacy_facedir_simple = true,
  14.     is_ground_content = false,
  15.     groups = {cracky=2, stone=1, oddly_breakable_by_hand=3},
  16.     sounds = default.node_sound_stone_defaults(),
  17.     selection_box = {
  18.         type = "fixed",
  19.         fixed = {
  20.             {-0.5, -0.5, 0, 1.5, 1.5, 0.5},
  21.         },
  22.     },
  23.     collision_box = {
  24.         type = "fixed",
  25.         fixed = {
  26.             {-0.5, -0.5, 0, 1.5, 1.5, 0.5},
  27.         },
  28.     },
  29.    
  30.     on_rightclick = function(pos, node, puncher)
  31.         minetest.sound_play("fire_small", {pos = pos, gain = 0.20, max_hear_distance = 10, loop = true})
  32.         minetest.swap_node(pos, {name = "fireplace:fireplace_01_active", param2 = node.param2})
  33.     end
  34. })
  35.  
  36. minetest.register_node("fireplace:fireplace_01_active", {
  37.     description = "Fireplace_01_Active",
  38.     drawtype = "mesh",
  39.     mesh = "fireplace.obj",
  40.     tiles = {
  41.         "fireplace_01_top.png", "fireplace_01_bottom.png",
  42.     "fireplace_01_side.png", "fireplace_01_side.png",
  43.         {
  44.             image = "fireplace_01_active.png",
  45.             backface_culling = false,
  46.             animation = {
  47.                 type = "vertical_frames",
  48.                 aspect_w = 32,
  49.                 aspect_h = 32,
  50.                 length = 1.9
  51.             },
  52.         }, "fireplace_01_side.png",
  53.     },
  54.     light_source = 8,
  55.     paramtype = "light",
  56.     paramtype2 = "facedir",
  57.     legacy_facedir_simple = true,
  58.     is_ground_content = false,
  59.     groups = {not_in_creative_inventory = 1},
  60.     sounds = default.node_sound_stone_defaults(),
  61.     selection_box = {
  62.         type = "fixed",
  63.         fixed = {
  64.             {-0.5, -0.5, 0, 1.5, 1.5, 0.5},
  65.         },
  66.     },
  67.     collision_box = {
  68.         type = "fixed",
  69.         fixed = {
  70.             {-0.5, -0.5, 0, 1.5, 1.5, 0.5},
  71.         },
  72.     },
  73.  
  74.     on_rightclick = function(pos, node, puncher)
  75.     minetest.after(10, function(handle)
  76.         minetest.sound_stop(handle)
  77.     end, handle)
  78.         minetest.swap_node(pos, {name = "fireplace:fireplace_01", param2 = node.param2})
  79.     end,
  80.     drop = "fireplace:fireplace_01",
  81. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement