diff --git a/scripts/mining-tools.lua b/scripts/mining-tools.lua index 6a6f1ecc..74f48f66 100644 --- a/scripts/mining-tools.lua +++ b/scripts/mining-tools.lua @@ -7,10 +7,10 @@ function mod.play_mining_sound(pindex) --game.print("1",{volume_modifier=0})-- if player and player.mining_state.mining and player.selected and player.selected.valid then --game.print("2",{volume_modifier=0})-- - if player.selected.prototype.is_building then + if player.selected and player.selected.prototype.is_building then player.play_sound({ path = "player-mine" }) --game.print("3A",{volume_modifier=0})-- - else + elseif player.selected and player.selected.type ~= "resource" then player.play_sound({ path = "player-mine" }) --Mine other things, eg. character corpses, laterdo new sound --game.print("3B",{volume_modifier=0})-- end