Extrahorns (#40)
* Extrahorn V1 * Indentation Edit 1 * Indentation Edit 2 Double checked that every single line has tab indents * getpos to get_pos * Drum flutes and triangle Drum flutes and triangle added * Added new texutres * Added new sounds
This commit is contained in:
parent
e92477a894
commit
4892abf31b
@ -1,10 +1,10 @@
|
||||
-- large horn
|
||||
minetest.register_craftitem ("extrahorns:largehorn", {
|
||||
minetest.register_craftitem("extrahorns:largehorn", {
|
||||
description = "Large Horn",
|
||||
inventory_image = "extrahorns_largehorn.png",
|
||||
groups = {instrument=1},
|
||||
groups = {instrument = 1},
|
||||
on_use = function (itemstack, user)
|
||||
minetest.sound_play ("extrahorns_largehorn", {
|
||||
minetest.sound_play("extrahorns_largehorn", {
|
||||
pos = user:get_pos(),
|
||||
max_hear_distance = 450,
|
||||
gain = 1,
|
||||
@ -12,7 +12,7 @@ minetest.register_craftitem ("extrahorns:largehorn", {
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft ({
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "extrahorns:largehorn",
|
||||
recipe = {"soundblocks:smallhorn", "default:steel_ingot"}
|
||||
@ -20,12 +20,12 @@ minetest.register_craft ({
|
||||
|
||||
-- Warhorn
|
||||
|
||||
minetest.register_craftitem ("extrahorns:warhorn", {
|
||||
minetest.register_craftitem("extrahorns:warhorn", {
|
||||
description = "War Horn" ,
|
||||
inventory_image = "extrahorns_warhorn.png",
|
||||
groups = {instrument=1},
|
||||
on_use = function (itemstack, user)
|
||||
minetest.sound_play ("extrahorns_warhorn", {
|
||||
groups = {instrument = 1},
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("extrahorns_warhorn", {
|
||||
pos = user:get_pos(),
|
||||
max_hear_distance = 550,
|
||||
gain = 1.2,
|
||||
@ -33,7 +33,7 @@ minetest.register_craftitem ("extrahorns:warhorn", {
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft ({
|
||||
minetest.register_craft({
|
||||
output = "extrahorns:warhorn",
|
||||
recipe = {
|
||||
{"extrahorns:largehorn", "", ""},
|
||||
@ -43,12 +43,12 @@ minetest.register_craft ({
|
||||
})
|
||||
|
||||
-- bagpipes
|
||||
minetest.register_craftitem ("extrahorns:bagpipes", {
|
||||
minetest.register_craftitem("extrahorns:bagpipes", {
|
||||
description = "Bagpipes",
|
||||
inventory_image = "extrahorns_bagpipe.png" ,
|
||||
groups = {instrument=1},
|
||||
groups = {instrument = 1},
|
||||
on_use = function (itemstack, user)
|
||||
minetest.sound_play ("extrahorns_bagpipe", {
|
||||
minetest.sound_play("extrahorns_bagpipe", {
|
||||
pos = user:get_pos(),
|
||||
max_hear_distance = 350,
|
||||
gain = 1,
|
||||
@ -56,11 +56,130 @@ minetest.register_craftitem ("extrahorns:bagpipes", {
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft ({
|
||||
minetest.register_craft({
|
||||
output = "extrahorns:bagpipes",
|
||||
recipe = {
|
||||
{ "default:stick", "default:stick", "default:gold_ingot"} ,
|
||||
{ "group:wool", "group:wool", ""} ,
|
||||
{ "group:wool", "group:wool", "default:stick" } ,
|
||||
{"default:stick", "default:stick", "default:gold_ingot"} ,
|
||||
{"group:wool", "group:wool", ""} ,
|
||||
{"group:wool", "group:wool", "default:stick" } ,
|
||||
}
|
||||
})
|
||||
|
||||
-- flute
|
||||
minetest.register_craftitem("extrahorns:flute", {
|
||||
description = "flute",
|
||||
inventory_image = "extrahorns_flute.png",
|
||||
groups = {instrument = 1},
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("extrahorns_flute", {
|
||||
pos = user:get_pos(),
|
||||
max_hear_distance = 100,
|
||||
gain = 1,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "extrahorns:flute",
|
||||
recipe = {
|
||||
{ "default:stick", "", ""},
|
||||
{ "", "default:stick", ""},
|
||||
{ "", "", "default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
-- steelflute
|
||||
minetest.register_craftitem("extrahorns:steelflute", {
|
||||
description = "steelflute",
|
||||
inventory_image = "extrahorns_steelflute.png",
|
||||
groups = {instrument = 1},
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("extrahorns_flute", {
|
||||
pos = user:get_pos(),
|
||||
max_hear_distance = 350,
|
||||
gain = 1,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "extrahorns:steelflute",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
--drumstick
|
||||
minetest.register_craftitem("extrahorns:drumstick", {
|
||||
description = "drumstick",
|
||||
inventory_image = "extrahorns_drumstick.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "extrahorns:drumstick",
|
||||
recipe = {
|
||||
{"group:wool", "", ""},
|
||||
{"", "default:stick", ""},
|
||||
{"", "", "default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
-- drum
|
||||
minetest.register_node("extrahorns:wardrum", {
|
||||
description = "War Drum",
|
||||
tiles = {
|
||||
"extrahorns_drum_top.png", -- Top
|
||||
"extrahorns_drum_bottom.png", -- Bottom
|
||||
"extrahorns_drum_side.png",
|
||||
"extrahorns_drum_side.png",
|
||||
"extrahorns_drum_side.png",
|
||||
"extrahorns_drum_side.png",
|
||||
},
|
||||
on_punch = function(pos, node, player, pointed_thing) -- if its punched
|
||||
if player then -- if the entity that punched it is a player
|
||||
if player:get_wielded_item():get_name() == "extrahorns:drumstick" then -- if holding drumstick
|
||||
minetest.sound_play("extrahorns_wardrum", { -- play drum sound
|
||||
pos = player:get_pos(),
|
||||
max_hear_distance = 500,
|
||||
gain = 2,
|
||||
})
|
||||
end
|
||||
end
|
||||
end,
|
||||
groups = {instrument = 1, choppy = 3} -- need axe to break it
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "extrahorns:wardrum",
|
||||
recipe = {
|
||||
{"default:paper", "default:paper", "default:paper"},
|
||||
{"group:wood", "", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
-- triangle
|
||||
|
||||
minetest.register_craftitem("extrahorns:triangle", {
|
||||
description = "Triangle",
|
||||
inventory_image = "extrahorns_triangle.png",
|
||||
groups = {instrument = 1},
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("extrahorns_triangle", {
|
||||
pos = user:get_pos(),
|
||||
max_hear_distance = 100,
|
||||
gain = 1,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "extrahorns:triangle",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
BIN
mods/extrahorns/sounds/extrahorns_flute.ogg
Normal file
BIN
mods/extrahorns/sounds/extrahorns_flute.ogg
Normal file
Binary file not shown.
BIN
mods/extrahorns/sounds/extrahorns_triangle.ogg
Normal file
BIN
mods/extrahorns/sounds/extrahorns_triangle.ogg
Normal file
Binary file not shown.
BIN
mods/extrahorns/sounds/extrahorns_wardrum.ogg
Normal file
BIN
mods/extrahorns/sounds/extrahorns_wardrum.ogg
Normal file
Binary file not shown.
BIN
mods/extrahorns/textures/extrahorns_drum_bottom.png
Normal file
BIN
mods/extrahorns/textures/extrahorns_drum_bottom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 782 B |
BIN
mods/extrahorns/textures/extrahorns_drum_side.png
Normal file
BIN
mods/extrahorns/textures/extrahorns_drum_side.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 773 B |
BIN
mods/extrahorns/textures/extrahorns_drum_top.png
Normal file
BIN
mods/extrahorns/textures/extrahorns_drum_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 421 B |
BIN
mods/extrahorns/textures/extrahorns_drumstick.png
Normal file
BIN
mods/extrahorns/textures/extrahorns_drumstick.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 310 B |
BIN
mods/extrahorns/textures/extrahorns_steelflute.png
Normal file
BIN
mods/extrahorns/textures/extrahorns_steelflute.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
mods/extrahorns/textures/extrahorns_triangle.png
Normal file
BIN
mods/extrahorns/textures/extrahorns_triangle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Loading…
x
Reference in New Issue
Block a user