1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Allow for Game-Specific Menu Music (#11241)

This commit is contained in:
ExeVirus 2021-11-22 12:26:46 -05:00 committed by GitHub
parent e35cfa589a
commit 52bfbf6ed0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 95 additions and 63 deletions

View file

@ -113,8 +113,16 @@ If you want to specify multiple images for one identifier, add additional
images named like `$identifier.$n.png`, with an ascending number $n starting
with 1, and a random image will be chosen from the provided ones.
Menu music
-----------
Games can provide custom main menu music. They are put inside a `menu`
directory inside the game directory.
The music files are named `theme.ogg`.
If you want to specify multiple music files for one game, add additional
images named like `theme.$n.ogg`, with an ascending number $n starting
with 1 (max 10), and a random music file will be chosen from the provided ones.
Mods
====
@ -5642,6 +5650,8 @@ Sounds
player actions (e.g. door closing).
* `minetest.sound_stop(handle)`
* `handle` is a handle returned by `minetest.sound_play`
* `minetest.sound_stop_all()`
Stops all currently playing non-ephermeral sounds.
* `minetest.sound_fade(handle, step, gain)`
* `handle` is a handle returned by `minetest.sound_play`
* `step` determines how fast a sound will fade.