Update README to markdown

Remove intllib support
This commit is contained in:
Louis Royer 2020-03-08 16:53:49 +01:00 committed by LNJ
parent 6a6e0ee944
commit 7fcc61a8ba
8 changed files with 96 additions and 176 deletions

View File

@ -1,4 +0,0 @@
PROJECT = drawers
updatepo:
./tools/updatepo.sh

94
README.md Normal file
View File

@ -0,0 +1,94 @@
# Minetest mod "Jukebox"
Version: 2.0
## License of source code
- Copyright (C) 2013 BlockMen <blockmen2015@gmail.com>
- Copyright (C) 2015-2016 LNJ <lnj.git@gmail.com>
- Copyright (C) 2016 Rui
```
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
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)

View File

@ -1,101 +0,0 @@
Minetest mod "Jukebox"
======================
Version: 2.0
License of source code:
-----------------------
Copyright (C) 2013 BlockMen <blockmen2015@gmail.com>
Copyright (C) 2015-2016 LNJ <lnj.git@gmail.com>
Copyright (C) 2016 Rui
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
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

View File

@ -1,2 +0,0 @@
default
intllib?

View File

@ -1,2 +0,0 @@
A mod that adds a jukebox with nine different discs. There is also an API to register new discs.

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- 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

View File

@ -1,2 +1,4 @@
name = jukebox name = jukebox
description = A mod that adds a jukebox with nine different discs. There is also an API to register new discs.
depends = default

View File

@ -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