added some clang sounds

now there are some clang sound that will played it the player digs or walks on the cannon
master
adrido 2013-12-04 16:28:00 +01:00
parent fdd7def7fe
commit cb62aeac32
11 changed files with 26 additions and 5 deletions

View File

@ -15,6 +15,18 @@ function cannons.destroy(pos,range)
end
end
function cannons.sound_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="cannons_walk", gain=1.0}
table.dig = table.dig or
{name="cannons_dig", gain=0.5}
table.dug = table.dug or
{name="default_dug_node", gain=0.5}
table.place = table.place or
{name="default_place_node_hard", gain=1.0}
return table
end
function cannons.inventory_modified(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()

View File

@ -168,7 +168,7 @@ minetest.register_node("cannons:cannon", {
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=1},
sounds = default.node_sound_wood_defaults(),
sounds = cannons.sound_defaults(),
node_box = cannons.nodebox,
on_place = cannons.on_place,
selection_box = cannons.nodebox,
@ -211,7 +211,7 @@ minetest.register_node("cannons:bronze_canon", {
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=1},
sounds = default.node_sound_wood_defaults(),
sounds = cannons.sound_defaults(),
node_box = cannons.nodebox,
selection_box = cannons.nodebox,
on_punch = cannons.punched,

View File

@ -2,6 +2,15 @@ cannons_splash.1.ogg
cannons_splash.2.ogg
cannons_splash.3.ogg
cannons_splash.4.ogg
License: Public Domain
source: http://www.mediacollege.com/downloads/sound-effects/water/
source: http://www.mediacollege.com/downloads/sound-effects/water/
cannons_dig.1.ogg
cannons_dig.2.ogg
cannons_dig.3.ogg
cannons_dig.4.ogg
cannons_walk.1.ogg
cannons_walk.2.ogg
cannons_walk.3.ogg
License: Public Domain

View File

@ -11,7 +11,7 @@ minetest.register_node("cannons:shared_locked_cannon", {
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=1},
sounds = default.node_sound_wood_defaults(),
sounds = cannons.sound_defaults(),
node_box = cannons.nodebox,
on_place = cannons.on_place,
selection_box = cannons.nodebox,

BIN
sounds/cannons_dig.1.ogg Normal file

Binary file not shown.

BIN
sounds/cannons_dig.2.ogg Normal file

Binary file not shown.

BIN
sounds/cannons_dig.3.ogg Normal file

Binary file not shown.

BIN
sounds/cannons_dig.4.ogg Normal file

Binary file not shown.

BIN
sounds/cannons_walk.1.ogg Normal file

Binary file not shown.

BIN
sounds/cannons_walk.2.ogg Normal file

Binary file not shown.

BIN
sounds/cannons_walk.3.ogg Normal file

Binary file not shown.