Version 0.0.1

master
Le Sanglier des Ardennes 2016-12-04 01:18:31 +01:00
commit 3b283b4856
9 changed files with 48 additions and 0 deletions

17
README.md Normal file
View 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
View 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,
})

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B