diff --git a/Makefile b/Makefile deleted file mode 100644 index e3555ec..0000000 --- a/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -PROJECT = drawers - -updatepo: - ./tools/updatepo.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..0c77e91 --- /dev/null +++ b/README.md @@ -0,0 +1,94 @@ +# Minetest mod "Jukebox" +Version: 2.0 + +## License of source code +- Copyright (C) 2013 BlockMen +- Copyright (C) 2015-2016 LNJ +- Copyright (C) 2016 Rui + +``` + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. +``` + + +## License of textures +(by Authors) + +- BlockMen (WTFPL): + - `jukebox_disc_*.png` (added coulors by lightonflux) + + +## License of music: CC0 +The authors are (freesound.org): +- cheesepuff (song1) +- geerterig (song2) +- rap2h (song3) +- keffstay (song4) +- usedtobe (song5) +- zagi2 (song6) + + + +## Notice +This mod is only useable with Minetest 5.0 or above! + + +## Description +In the Jukebox plus mod you've got 9 different music discs. + +You can add music by copy your ogg file to the sounds folder and renaming them to e.g. this: +`jukebox_disc_2.0.ogg` +But pay attention that the sounds have to be mono, else you can hear the music all over the world. + +There are 9 discs so there are the sound files `jukebox_disc_1.*.ogg` to `jukebox_disc_9.*.ogg`. +The small star can be replaced by the numbers 0 to 9. + +So you can have up to 9x10 (90) songs! + + +## Using the mod +To use the jukebox, you have to craft one. You need 8 wood and 1 mese crystal to craft it following way: + +``` +wood wood wood +wood mese crystal wood +wood wood wood +``` + +Just rightclick with a music disc in your hand on the jukebox and it will play a random song from this disc. +To stop the music rightclick the box again and it will drop the music disc. + + +## API Documentation +The jukebox mod offers a simple API to register new discs. See here how to use it: + +```lua +jukebox.register_disc("mymod:new_disc", { + description = "New Disc", + -- ^ The item description + inventory_image = "mymod_new_disc.png", + -- ^ The disc image / texture + music_name = "mymod_new_disc", + -- ^ This is the sound that'll be played if you insert the disc + + -- if you want to you can add here more options as in minetest.register_craftitem (except stack_max) +}) +``` + + + +## Links +- [Forum Topic](https://forum.minetest.net/viewtopic.php?id=13505) +- [GitHub](https://github.com/minetest-mods/jukebox) diff --git a/README.txt b/README.txt deleted file mode 100644 index bee644e..0000000 --- a/README.txt +++ /dev/null @@ -1,101 +0,0 @@ -Minetest mod "Jukebox" -====================== -Version: 2.0 - -License of source code: ------------------------ -Copyright (C) 2013 BlockMen -Copyright (C) 2015-2016 LNJ -Copyright (C) 2016 Rui - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - - - -License of textures: --------------------- -(by Authors) - -BlockMen (WTFPL): - jukebox_disc_*.png (added coulors by lightonflux) - - -License of music: CC0 ---------------------- -The authors are (freesound.org): - - cheesepuff (song1) - - geerterig (song2) - - rap2h (song3) - - keffstay (song4) - - usedtobe (song5) - - zagi2 (song6) - - - -Notice: -------- -This mod is only useable with Minetest 0.4.14 or above! - - -Description: ------------- -In the Jukebox plus mod you've got 9 different music discs. - -You can add music by copy your ogg file to the sounds folder and renaming them to e.g. this: -jukebox_disc_2.0.ogg -But pay attention that the sounds have to be mono, else you can hear the music all over the world. - -There are 9 discs so there are the sound files jukebox_disc_1.*.ogg to jukebox_disc_9.*.ogg. -The small star can be replaced by the numbers 0 to 9. - -So you can have up to 9x10 (90) songs! - - -Using the mod: --------------- -To use the jukebox, you have to craft one. You need 8 wood and 1 mese crystal to craft it following way: - -wood wood wood -wood mese crystal wood -wood wood wood - -Just rightclick with a music disc in your hand on the jukebox and it will play a random song from this disc. -To stop the music rightclick the box again and it will drop the music disc. - - -API Documentation: ------------------- -The jukebox mod offers a simple API to register new discs. See here how to use it: - -jukebox.register_disc("mymod:new_disc", { - description = "New Disc", - ^ The item description - inventory_image = "mymod_new_disc.png", - ^ The disc image / texture - music_name = "mymod_new_disc", - ^ This is the sound that'll be played if you insert the disc - - -- if you want to you can add here more options as in minetest.register_craftitem (except stack_max) -}) - - - -Links: ------- -Forum Topic: - https://forum.minetest.net/viewtopic.php?id=13505 - -GitHub: - https://github.com/minetest-mods/jukebox diff --git a/depends.txt b/depends.txt deleted file mode 100644 index 198fe8a..0000000 --- a/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -intllib? diff --git a/description.txt b/description.txt deleted file mode 100644 index 3204d76..0000000 --- a/description.txt +++ /dev/null @@ -1,2 +0,0 @@ -A mod that adds a jukebox with nine different discs. There is also an API to register new discs. - diff --git a/intllib.lua b/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/mod.conf b/mod.conf index 744a4ad..19c0643 100644 --- a/mod.conf +++ b/mod.conf @@ -1,2 +1,4 @@ name = jukebox +description = A mod that adds a jukebox with nine different discs. There is also an API to register new discs. +depends = default diff --git a/tools/updatepo.sh b/tools/updatepo.sh deleted file mode 100755 index 74332e0..0000000 --- a/tools/updatepo.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/bash - -# To create a new translation: -# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot - -cd "$(dirname "${BASH_SOURCE[0]}")/.."; - -# Extract translatable strings. -xgettext --from-code=UTF-8 \ - --keyword=S \ - --keyword=NS:1,2 \ - --keyword=N_ \ - --add-comments='Translators:' \ - --add-location=file \ - -o locale/template.pot \ - $(find . -name '*.lua') - -# Update translations. -find locale -name '*.po' | while read -r file; do - echo $file - msgmerge --update $file locale/template.pot; -done