Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- minetest.register_node("tnt:tnt", {
- description = "TNT",
- tiles = {"tnt_top.png", "tnt_bottom.png", "tnt_side.png"},
- groups = {dig_immediate=2, mesecon=2},
- sounds = default.node_sound_wood_defaults(),
- on_punch = function(pos, node, puncher)
- if puncher:get_wielded_item():get_name() == "default:torch" then
- if minetest.get_player_privs(puncher).use_tnt then
- minetest.sound_play("tnt_ignite", {pos=pos})
- minetest.set_node(pos, {name="tnt:tnt_burning"})
- minetest.get_node_timer(pos):start(4)
- return
- else then
- minetest.chat_send_player(puncher, "You don't have the required priv to use tnt.")
- return
- end
- end
- end,
- mesecons = {effector = {action_on = boom}},
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement