Merge branch 'master' into feature/quiver-inventory-slots

This commit is contained in:
Juraj Vajda 2022-10-28 09:55:29 -04:00
commit 44e8cd63ee
2 changed files with 8 additions and 6 deletions

12
api.lua
View File

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

View File

@ -3,7 +3,7 @@ minetest.register_node('x_bows:target', {
tiles = {'x_bows_target.png'}, tiles = {'x_bows_target.png'},
is_ground_content = false, is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent = -30}, groups = {snappy=3, flammable=4, fall_damage_add_percent = -30},
sounds = default.node_sound_leaves_defaults(), sounds = minetest.global_exists('default') and default.node_sound_leaves_defaults() or {},
mesecons = {receptor = {state = 'off'}}, mesecons = {receptor = {state = 'off'}},
---@param pos Vector ---@param pos Vector
---@param elapsed number ---@param elapsed number