diff --git a/mods/jukebox/README.txt b/mods/jukebox/README.txt deleted file mode 100755 index 4857cc79..00000000 --- a/mods/jukebox/README.txt +++ /dev/null @@ -1,47 +0,0 @@ -Minetest mod "Jukebox" -======================= -version: 1.0 - -License of source code and textures: WTFPL ------------------------------------------ -(c) Copyright BlockMen (2013) - - -License of music: CC0 ---------------------- -The authors are : (freesound.org) --cheesepuff (song1) --geerterig (song2) --rap2h (song3) --keffstay (song4) --usedtobe (song5) --zagi2 (song6) - -This program is free software. It comes without any warranty, to -the extent permitted by applicable law. You can redistribute it -and/or modify it under the terms of the Do What The Fuck You Want -To Public License, Version 2, as published by Sam Hocevar. See -http://sam.zoy.org/wtfpl/COPYING for more details. - - -Using the mod: --------------- - -To use the jukebox, you have to craft one. You need 8 wood and 1 diamond to craft it following way: - -wood wood wood -wood diamond wood -wood wood wood - - -Furthermore you need Music Discs, that you can craft following way: - - - - coal - -coal gold coal - - coal - - - -Just click with a music disc in your hand on the jukebox and it will play a random song. To stop the music -rightclick the box again and it will drop the music disc. - diff --git a/mods/jukebox/depends.txt b/mods/jukebox/depends.txt deleted file mode 100755 index 29ce1879..00000000 --- a/mods/jukebox/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -soundset diff --git a/mods/jukebox/init.lua b/mods/jukebox/init.lua deleted file mode 100755 index 0878730c..00000000 --- a/mods/jukebox/init.lua +++ /dev/null @@ -1,179 +0,0 @@ -jukebox = {} -jukebox.tracks = {} -jukebox.nbtracks = 0 -jukebox.particles = {} - -function make_particles(pos) - -- create particles table - if jukebox.particles[pos.x] == nil then - jukebox.particles[pos.x] = {} - end - if jukebox.particles[pos.x][pos.y] == nil then - jukebox.particles[pos.x][pos.y] = {} - end - if jukebox.particles[pos.x][pos.y][pos.z] == nil then - jukebox.particles[pos.x][pos.y][pos.z] = {} - end - --create particle spawner - local particle = minetest.add_particlespawner({ - amount = 1, - time = 0, - minpos = {x=pos.x, y=pos.y, z=pos.z}, - maxpos = {x=pos.x, y=pos.y, z=pos.z}, - minvel = {x=0, y=2, z=0}, - maxvel = {x=0, y=2, z=0}, - minacc = {x=0, y=0, z=0}, - maxacc = {x=0, y=0, z=0}, - minexptime = 1, - maxexptime = 1, - minsize = 5, - maxsize = 5, - collisiondetection = false, - vertical = true, - texture = "jukebox_note.png", - }) - --add the particle spawner to the global table - jukebox.particles[pos.x][pos.y][pos.z] = particle -end - -function free_particles(pos) - --remove particle spawner - if jukebox.particles[pos.x] ~= nil then - if jukebox.particles[pos.x][pos.y] ~= nil then - if jukebox.particles[pos.x][pos.y][pos.z] ~= nil then - minetest.delete_particlespawner(jukebox.particles[pos.x][pos.y][pos.z]) - jukebox.particles[pos.x][pos.y][pos.z] = nil - end - end - end -end - -minetest.register_node("jukebox:box", { - description = "Jukebox", - drawtype = "nodebox", - tiles = {"jukebox_top.png", "default_wood.png", "jukebox_side.png", - "jukebox_side.png", "jukebox_front.png", "jukebox_front.png"}, - paramtype = "light", - paramtype2 = "facedir", - stack_max = 1, - groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2}, - sounds = default.node_sound_wood_defaults(), - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - - }, - on_rightclick = function(pos, node, clicker, itemstack) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - if not clicker then return end - if minetest.get_item_group( - clicker:get_wielded_item():get_name(), "disc") == 1 - and inv:is_empty("main") then - local discname = clicker:get_wielded_item():get_name() - local tracknum = tonumber(discname:split("_")[2]) - local track = jukebox.tracks[tracknum] - - if not track then - minetest.chat_send_player(clicker:get_player_name(), "ERROR: Cannot find track number " .. (tracknum or "") .. "...") - return - end - - inv:add_item("main", itemstack:take_item()) - meta:set_string("now_playing", minetest.sound_play(track, { - gain = soundset.get_gain(clicker:get_player_name(), - "music"), - max_hear_distance = 25, - pos = pos, - loop = true, - })) - make_particles(pos) - else - if not inv:is_empty("main") then - local drop_pos = minetest.find_node_near(pos, 1, "air") - if drop_pos == nil then drop_pos = {x=pos.x, y=pos.y+1,z=pos.z} end - minetest.add_item(drop_pos, inv:get_stack("main",1)) - inv:remove_item("main", inv:get_stack("main",1)) - if meta:get_string("now_playing") then - minetest.sound_stop(meta:get_string("now_playing")) - free_particles(pos) - end - end - end - end, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - inv:set_size("main", 1) - end, - on_destruct = function(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") - if drop_pos == nil then drop_pos = {x=pos.x, y=pos.y+1,z=pos.z} end - minetest.add_item(drop_pos, inv:get_stack("main",1)) - if meta:get_string("now_playing") then minetest.sound_stop(meta:get_string("now_playing")) end - end - free_particles(pos) - end, -}) - -minetest.register_craft({ - output = "jukebox:box", - recipe = { - {"group:wood", "group:wood", "group:wood", }, - {"group:wood", "default:diamond", "group:wood", }, - {"group:wood", "group:wood", "group:wood", } - } -}) - - -local function register_disc(trackname, trackdesc, craftitem) - -- Vital information - if not trackname then - minetest.log("error", "[jukebox] Failed registering disc") - end - -- Default values for the other ones - trackdesc = trackdesc or "???" - craftitem = craftitem or "group:wood" - - local id = jukebox.nbtracks - - minetest.register_craftitem("jukebox:disc_" .. id, { - description = "Music Disc : " .. trackdesc, - inventory_image = "jukebox_disc_" .. id .. ".png", - liquids_pointable = false, - stack_max = 1, - groups = {disc = 1}, - }) - - jukebox.tracks[id] = trackname - - minetest.register_craft({ - output = "jukebox:disc_" .. id, - recipe = { - {"", "default:coal_lump", ""}, - {"default:coal_lump", craftitem,"default:coal_lump"}, - {"","default:coal_lump",""} - } - }) - - minetest.log("action", "[jukebox] Registrered disc " .. trackdesc .. - ", id = " .. id .. " for file " .. trackname) - - jukebox.nbtracks = jukebox.nbtracks + 1 -end - -register_disc("jukebox_event", "Event song", "default:stone") -register_disc("jukebox_trololo", "Trololo", "default:obsidian_shard") -register_disc("jukebox_song_1", "Sweet Rock", "default:dirt") -register_disc("jukebox_song_2", "Bomber Boom", "default:grass") -register_disc("jukebox_song_3", "Pumpking's Dance", "default:glass") -register_disc("jukebox_song_4", "Mecha Fight", "default:ice") -register_disc("jukebox_song_5", "Chillout", "default:snowblock") -register_disc("jukebox_song_6", "Space Mistery", "default:cobble") diff --git a/mods/jukebox/sounds/jukebox_event.ogg b/mods/jukebox/sounds/jukebox_event.ogg deleted file mode 100755 index e910d44b..00000000 Binary files a/mods/jukebox/sounds/jukebox_event.ogg and /dev/null differ diff --git a/mods/jukebox/sounds/jukebox_song_1.ogg b/mods/jukebox/sounds/jukebox_song_1.ogg deleted file mode 100755 index 5870a47d..00000000 Binary files a/mods/jukebox/sounds/jukebox_song_1.ogg and /dev/null differ diff --git a/mods/jukebox/sounds/jukebox_song_2.ogg b/mods/jukebox/sounds/jukebox_song_2.ogg deleted file mode 100755 index 8cc92998..00000000 Binary files a/mods/jukebox/sounds/jukebox_song_2.ogg and /dev/null differ diff --git a/mods/jukebox/sounds/jukebox_song_3.ogg b/mods/jukebox/sounds/jukebox_song_3.ogg deleted file mode 100755 index 3e8305e0..00000000 Binary files a/mods/jukebox/sounds/jukebox_song_3.ogg and /dev/null differ diff --git a/mods/jukebox/sounds/jukebox_song_4.ogg b/mods/jukebox/sounds/jukebox_song_4.ogg deleted file mode 100755 index ec1c8c08..00000000 Binary files a/mods/jukebox/sounds/jukebox_song_4.ogg and /dev/null differ diff --git a/mods/jukebox/sounds/jukebox_song_5.ogg b/mods/jukebox/sounds/jukebox_song_5.ogg deleted file mode 100755 index be036100..00000000 Binary files a/mods/jukebox/sounds/jukebox_song_5.ogg and /dev/null differ diff --git a/mods/jukebox/sounds/jukebox_song_6.ogg b/mods/jukebox/sounds/jukebox_song_6.ogg deleted file mode 100755 index 3e9df5d8..00000000 Binary files a/mods/jukebox/sounds/jukebox_song_6.ogg and /dev/null differ diff --git a/mods/jukebox/sounds/jukebox_trololo.ogg b/mods/jukebox/sounds/jukebox_trololo.ogg deleted file mode 100644 index 029b978e..00000000 Binary files a/mods/jukebox/sounds/jukebox_trololo.ogg and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_disc_0.png b/mods/jukebox/textures/jukebox_disc_0.png deleted file mode 100755 index 5fa92382..00000000 Binary files a/mods/jukebox/textures/jukebox_disc_0.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_disc_1.png b/mods/jukebox/textures/jukebox_disc_1.png deleted file mode 100755 index 6495580b..00000000 Binary files a/mods/jukebox/textures/jukebox_disc_1.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_disc_2.png b/mods/jukebox/textures/jukebox_disc_2.png deleted file mode 100755 index 318565ff..00000000 Binary files a/mods/jukebox/textures/jukebox_disc_2.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_disc_3.png b/mods/jukebox/textures/jukebox_disc_3.png deleted file mode 100755 index 587673f7..00000000 Binary files a/mods/jukebox/textures/jukebox_disc_3.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_disc_4.png b/mods/jukebox/textures/jukebox_disc_4.png deleted file mode 100755 index b8f03f0f..00000000 Binary files a/mods/jukebox/textures/jukebox_disc_4.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_disc_5.png b/mods/jukebox/textures/jukebox_disc_5.png deleted file mode 100644 index b121f92e..00000000 Binary files a/mods/jukebox/textures/jukebox_disc_5.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_disc_6.png b/mods/jukebox/textures/jukebox_disc_6.png deleted file mode 100755 index 8e31ba0a..00000000 Binary files a/mods/jukebox/textures/jukebox_disc_6.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_disc_7.png b/mods/jukebox/textures/jukebox_disc_7.png deleted file mode 100755 index f02c0aa1..00000000 Binary files a/mods/jukebox/textures/jukebox_disc_7.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_front.png b/mods/jukebox/textures/jukebox_front.png deleted file mode 100755 index 4eca5aa3..00000000 Binary files a/mods/jukebox/textures/jukebox_front.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_note.png b/mods/jukebox/textures/jukebox_note.png deleted file mode 100755 index 664e3921..00000000 Binary files a/mods/jukebox/textures/jukebox_note.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_side.png b/mods/jukebox/textures/jukebox_side.png deleted file mode 100755 index fdda7c7d..00000000 Binary files a/mods/jukebox/textures/jukebox_side.png and /dev/null differ diff --git a/mods/jukebox/textures/jukebox_top.png b/mods/jukebox/textures/jukebox_top.png deleted file mode 100755 index 06ba62d7..00000000 Binary files a/mods/jukebox/textures/jukebox_top.png and /dev/null differ diff --git a/worlds/minetestforfun/world.mt b/worlds/minetestforfun/world.mt index bae13060..a920b62d 100755 --- a/worlds/minetestforfun/world.mt +++ b/worlds/minetestforfun/world.mt @@ -208,7 +208,6 @@ load_mod_time_regulation = true load_mod_soundset = true load_mod_ambience = true -load_mod_jukebox = true load_mod_music = true load_mod_areas = true