Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- minetest.register_node("tbm:tbm", {
- description = "Tunnel Boring Machine",
- tiles = {"tbm_side.png",
- "tbm_side.png",
- "tbm_side.png",
- "tbm_side.png",
- {name="tbm_front_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.6}},
- "tbm_side.png"},
- paramtype = "light",
- inventory_image = "tbm_inv.png",
- is_ground_content = false,
- wield_image = "tbm_inv.png",
- paramtype2 = 'facedir',
- light_source = 10,
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {
- {-1.500000,-0.500000,-0.500000,1.500000,2.500000,0.500000}, --front
- {-1.500000,-0.500000,-0.500000,-1.300000,2.500000,-4.500000}, --left
- {-1.500000,2.300000,-0.500000,1.500000,2.500000,-4.500000}, --top
- {1.300000,-0.500000,-0.500000,1.500000,2.500000,-4.500000}, --right
- {-1.500000,-0.500000,-0.500000,1.500000,-0.300000,-4.500000}, --bottom
- },
- },
- groups = {cracky=1},
- on_construct = function(pos)
- tbm.placetbm(pos, "0")
- minetest.after(10, function()
- tbm.drill(pos)
- end)
- end,
- can_dig = function(pos,player)
- local meta = minetest.get_meta(pos)
- local inv = meta:get_inventory()
- return inv:is_empty("main") and inv:is_empty("inv")
- end,
- on_metadata_inventory_put = function(pos, listname, index, stack, player)
- if listname == "main" then
- minetest.after(10, function()
- tbm.drill(pos)
- end)
- end
- end,
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement