Advertisement
Guest User

Untitled

a guest
Sep 1st, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. minetest.register_node("tbm:tbm", {
  2. description = "Tunnel Boring Machine",
  3. tiles = {"tbm_side.png",
  4. "tbm_side.png",
  5. "tbm_side.png",
  6. "tbm_side.png",
  7. {name="tbm_front_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.6}},
  8. "tbm_side.png"},
  9. paramtype = "light",
  10. inventory_image = "tbm_inv.png",
  11. is_ground_content = false,
  12. wield_image = "tbm_inv.png",
  13. paramtype2 = 'facedir',
  14. light_source = 10,
  15. drawtype = "nodebox",
  16. node_box = {
  17. type = "fixed",
  18. fixed = {
  19. {-1.500000,-0.500000,-0.500000,1.500000,2.500000,0.500000}, --front
  20. {-1.500000,-0.500000,-0.500000,-1.300000,2.500000,-4.500000}, --left
  21. {-1.500000,2.300000,-0.500000,1.500000,2.500000,-4.500000}, --top
  22. {1.300000,-0.500000,-0.500000,1.500000,2.500000,-4.500000}, --right
  23. {-1.500000,-0.500000,-0.500000,1.500000,-0.300000,-4.500000}, --bottom
  24. },
  25. },
  26. groups = {cracky=1},
  27. on_construct = function(pos)
  28. tbm.placetbm(pos, "0")
  29. minetest.after(10, function()
  30. tbm.drill(pos)
  31. end)
  32. end,
  33. can_dig = function(pos,player)
  34. local meta = minetest.get_meta(pos)
  35. local inv = meta:get_inventory()
  36. return inv:is_empty("main") and inv:is_empty("inv")
  37. end,
  38. on_metadata_inventory_put = function(pos, listname, index, stack, player)
  39. if listname == "main" then
  40. minetest.after(10, function()
  41. tbm.drill(pos)
  42. end)
  43. end
  44. end,
  45. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement