remove old footstep sound, add dig sounds.

This commit is contained in:
Auke Kok 2016-05-02 21:28:15 -07:00
parent e9e3819b71
commit 9ff4807f96
2 changed files with 5 additions and 2 deletions

View File

@ -368,10 +368,11 @@ entity_ai.register_driver("eat", {
return
end
local node = minetest.get_node(food)
minetest.sound_play(minetest.registered_nodes[node.name].sounds.dug, {pos = food, max_hear_distance = 18})
if node.name == "default:dirt_with_grass" or node.name == "default:dirt_with_dry_grass" then
minetest.set_node(food, {name = "default:dirt"})
elseif node.name == "default:grass_1" or node.name == "default:dry_grass_1" then
minetest.remove_node(food)
--elseif node.name == "default:grass_1" or node.name == "default:dry_grass_1" then
-- minetest.remove_node(food)
elseif node.name == "default:grass_2" then
minetest.set_node(food, {name = "default:grass_1"})
elseif node.name == "default:grass_3" then
@ -653,6 +654,8 @@ local sheep_script = {
hp_max = 20,
foodnodes = {
"group:grass",
"default:dirt_with_grass",
"default:dirt_with_dry_grass",
"default:grass_1",
"default:grass_2",
"default:grass_3",

Binary file not shown.