Skip to content

Commit

Permalink
fix double mining sounds for resources
Browse files Browse the repository at this point in the history
  • Loading branch information
LevFendi committed May 7, 2024
1 parent 7867032 commit bc49c48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mining-tools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bc49c48

Please sign in to comment.