Merge branch 'master' into feature/add-visible-damage-points

This commit is contained in:
Juraj Vajda 2022-10-30 19:40:33 -04:00
commit 364572db26

10
api.lua
View File

@ -1370,12 +1370,12 @@ end
---@param damage number|integer
---@return boolean
function XBowsEntityDef.on_punch(self, selfObj, puncher, time_from_last_punch, tool_capabilities, dir, damage)
local wood_sound_def = minetest.global_exists('default') and default.node_sound_wood_defaults() or nil
local pos = selfObj.object:get_pos()
if wood_sound_def then
minetest.sound_play(wood_sound_def.dig.name, {
pos = selfObj.object:get_pos(),
gain = wood_sound_def.dig.gain
if pos then
minetest.sound_play('default_dig_choppy', {
pos = pos,
gain = 0.4
})
end