diff options
author | Maciej Kasatkin <mk@realbadangel.pl> | 2012-10-15 22:29:52 +0200 |
---|---|---|
committer | Maciej Kasatkin <mk@realbadangel.pl> | 2012-10-15 22:29:52 +0200 |
commit | 77e83840f56e364ef94a072fb161bb67c9ac5323 (patch) | |
tree | 1bc8a3c51d96c92ec06d2857de5ad2148d794df1 /mining_drill.lua | |
parent | 9aa8ced2e03b61669e7a0585df549ad119f692f7 (diff) |
fixes to laser and mining drill
Diffstat (limited to 'mining_drill.lua')
-rw-r--r-- | mining_drill.lua | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/mining_drill.lua b/mining_drill.lua index 3f2a7c8..33dfe2b 100644 --- a/mining_drill.lua +++ b/mining_drill.lua @@ -38,23 +38,13 @@ minetest.register_craft({ function drill_dig_it (pos, player) local node=minetest.env:get_node(pos) - if node.name == "air" then return end + if node.name == "air" or node.name == "ignore" then return end if node.name == "default:lava_source" then return end if node.name == "default:lava_flowing" then return end if node.name == "default:water_source" then minetest.env:remove_node(pos) return end if node.name == "default:water_flowing" then minetest.env:remove_node(pos) return end - if node.name == "ignore" then minetest.env:remove_node(pos) return end - - if player then - local drops = minetest.get_node_drops(node.name, "default:pick_mese") - if player:get_inventory() then - local _, dropped_item - for _, dropped_item in ipairs(drops) do - player:get_inventory():add_item("main", dropped_item) - end - end + minetest.sound_play("mining_drill", {pos = pos, gain = 1.0, max_hear_distance = 10,}) - minetest.env:remove_node(pos) - end + minetest.node_dig(pos,node,player) end
\ No newline at end of file |