Add bed spawn setting sound

master
Wuzzy 2021-08-14 15:06:33 +02:00
parent 7c3279dc92
commit 10d1acc5f0
3 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,6 @@ About
~~~~~
This mod adds a bed which allows to set the respawn position. Just rightclick the bed.
License of source code, textures and everything else: MIT License
License of source code, textures, sounds and everything else: MIT License
(c) Copyright BlockMen (2014-2015)

Binary file not shown.

View File

@ -4,6 +4,7 @@ function hades_beds.set_spawn(player, pos, silent)
local name = player:get_player_name()
player:get_meta():set_string("hades_beds:spawn_pos", minetest.pos_to_string(pos))
if not silent then
minetest.sound_play({name="hades_beds_set_spawn"}, {gain=0.5, to_player=name}, true)
minetest.chat_send_player(name, minetest.colorize("#00FFFF", S("Spawn position set!")))
end
end