Version 0.0.1
This commit is contained in:
commit
3b283b4856
17
README.md
Normal file
17
README.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Minetest node/block vinyl player
|
||||||
|
================================
|
||||||
|
|
||||||
|
|
||||||
|
* Convert Youtube video to mp3:
|
||||||
|
http://www.youtube-mp3.org/fr
|
||||||
|
|
||||||
|
|
||||||
|
* Convert mp3 to ogg:
|
||||||
|
|
||||||
|
$ sudo apt-get install ffmpeg
|
||||||
|
$ ffmpeg -i Jex\ Thoth\ -\ Keep\ Your\ Weeds.mp3 vinylplayer_keepyourweeds.ogg
|
||||||
|
|
||||||
|
|
||||||
|
* API documentation:
|
||||||
|
|
||||||
|
http://dev.minetest.net/minetest.sound_play
|
31
init.lua
Normal file
31
init.lua
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
-- /giveme vinylplayer:player 99
|
||||||
|
minetest.register_node("vinylplayer:player", {
|
||||||
|
description = "Vinyl Player",
|
||||||
|
tiles = {
|
||||||
|
"vinylplayer_player_up.png",
|
||||||
|
"vinylplayer_player_down.png",
|
||||||
|
"vinylplayer_player_right.png",
|
||||||
|
"vinylplayer_player_left.png",
|
||||||
|
"vinylplayer_player_back.png",
|
||||||
|
"vinylplayer_player_front.png"
|
||||||
|
},
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky = 3},
|
||||||
|
drop = "vinylplayer:player_fragments",
|
||||||
|
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||||
|
local pos = pointed_thing
|
||||||
|
if not pos then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
local playerName = player:get_player_name()
|
||||||
|
minetest.chat_send_player(playerName, "on_rightclick: play sound")
|
||||||
|
|
||||||
|
handle = minetest.sound_play("vinylplayer_keepyourweeds", {
|
||||||
|
gain = 10.0,
|
||||||
|
max_hear_distance = 32,
|
||||||
|
})
|
||||||
|
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
BIN
sounds/vinylplayer_keepyourweeds.ogg
Normal file
BIN
sounds/vinylplayer_keepyourweeds.ogg
Normal file
Binary file not shown.
BIN
textures/vinylplayer_player_back.png
Normal file
BIN
textures/vinylplayer_player_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 408 B |
BIN
textures/vinylplayer_player_down.png
Normal file
BIN
textures/vinylplayer_player_down.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 447 B |
BIN
textures/vinylplayer_player_front.png
Normal file
BIN
textures/vinylplayer_player_front.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 291 B |
BIN
textures/vinylplayer_player_left.png
Normal file
BIN
textures/vinylplayer_player_left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 446 B |
BIN
textures/vinylplayer_player_right.png
Normal file
BIN
textures/vinylplayer_player_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 452 B |
BIN
textures/vinylplayer_player_up.png
Normal file
BIN
textures/vinylplayer_player_up.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 260 B |
Loading…
x
Reference in New Issue
Block a user