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
@ -64,3 +64,122 @@ minetest.register_craft ({
|
||||
{"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