Update README to markdown
Remove intllib support
This commit is contained in:
parent
6a6e0ee944
commit
7fcc61a8ba
94
README.md
Normal file
94
README.md
Normal 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)
|
101
README.txt
101
README.txt
@ -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
|
@ -1,2 +0,0 @@
|
||||
default
|
||||
intllib?
|
@ -1,2 +0,0 @@
|
||||
A mod that adds a jukebox with nine different discs. There is also an API to register new discs.
|
||||
|
45
intllib.lua
45
intllib.lua
@ -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
|
2
mod.conf
2
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
|
||||
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user