Add background music

master
PilzAdam 2015-10-29 17:10:26 +01:00
parent d139b50797
commit e00d4cda05
4 changed files with 18 additions and 10 deletions

View File

@ -30,14 +30,17 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
License of media (textures, sounds and models):
-----------------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
License of textures:
--------------------
Copyright (C) 2013 PilzAdam <pilzadam@minetest.net>
CC BY-SA 3.0: http://creativecommons.org/licenses/by-sa/3.0/
Authors of media (textures, sounds and models):
-----------------------------------------------
Everything not listed here: Copyright (C) 2013 PilzAdam <pilzadam@minetest.net>
License of sound effects:
-------------------------
Copyright (C) 2013 Mito551
CC BY-SA 3.0: http://creativecommons.org/licenses/by-sa/3.0/
Copyright (C) 2013 Mito551:
All soundfiles (*.ogg)
License of background music (score_background.ogg):
---------------------------------------------------
Copyright (C) 2006 natlyea https://libre.fm/artist/natlyea/
CC BY 2.5: http://creativecommons.org/licenses/by/2.5/

View File

@ -70,7 +70,7 @@ local function get_light_cost(level)
local cost = {}
cost["score:coal_" .. level] = 50
if level > 1 then
cost["score:coal_" .. (level + 1)] = 80
cost["score:coal_" .. (level - 1)] = 80
end
return cost
end
@ -314,6 +314,11 @@ minetest.register_on_joinplayer(function(player)
alignment = { x = -1, y = -1 },
})
minetest.sound_play("score_background", {
to_player = player:get_player_name(),
loop = true, -- TODO
})
local hud_inv = player:get_inventory()
hud_inv:set_size("main", INV_SIZE)
if not hud_inv:get_stack("main", INV_PICK_INDEX):get_name():match("^score:pick_") or

Binary file not shown.

Binary file not shown.