1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-17 15:58:26 +01:00

[jukebox] Fix looping, and add a new disc

This commit is contained in:
LeMagnesium 2015-10-03 20:15:55 +02:00
parent 8c969019d1
commit 39110eaa97
2 changed files with 4 additions and 2 deletions

View File

@ -88,7 +88,8 @@ minetest.register_node("jukebox:box", {
gain = soundset.get_gain(clicker:get_player_name(),
"music"),
max_hear_distance = 25,
loop = 1,
pos = pos,
loop = true,
}))
make_particles(pos)
else
@ -110,7 +111,7 @@ minetest.register_node("jukebox:box", {
inv:set_size("main", 1)
end,
on_destruct = function(pos)
local meta = minetest.env:get_meta(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if not inv:is_empty("main") then
local drop_pos = minetest.find_node_near(pos, 1, "air")
@ -169,3 +170,4 @@ local function register_disc(trackname, trackdesc, craftitem)
end
register_disc("jukebox_event", "Event song", "default:stone")
register_disc("jukebox_trololo", "Trololo", "default:obsidian_shard")

Binary file not shown.