star_wars/mods/rangedweapons/door_breaking.lua

22 lines
510 B
Lua
Raw Normal View History

2020-11-20 19:30:51 +01:00
if minetest.get_modpath("doors") then
minetest.override_item("doors:door_wood_a", {
on_timer = function(pos)
minetest.swap_node(pos, {name = "air"})
minetest.add_item(pos, "default:wood 5")
minetest.sound_play("rangedweapons_woodbreak",{pos})
end,
})
minetest.override_item("doors:door_wood_b", {
on_timer = function(pos)
minetest.swap_node(pos, {name = "air"})
minetest.add_item(pos, "default:wood 5")
minetest.sound_play("rangedweapons_woodbreak",{pos})
end,
})
end