mirror of
https://github.com/Sokomine/travelnet.git
synced 2024-08-20 13:34:20 +02:00
Merge pull request #34 from poikilos/restore_sound
replacement for missing sound, and different for elevator
This commit is contained in:
commit
74da8a296e
BIN
etc/travelnet_bell.mmpz
Normal file
BIN
etc/travelnet_bell.mmpz
Normal file
Binary file not shown.
7
etc/travelnet_bell.xml
Normal file
7
etc/travelnet_bell.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<tags>
|
||||||
|
<tag name="Software" value="LMMS (libsndfile-1.0.26pre5)"/>
|
||||||
|
<tag name="YEAR" value="2017-05-25"/>
|
||||||
|
<tag name="TITLE" value="travelnet bell"/>
|
||||||
|
<tag name="COMMENTS" value="CC-BY-SA 3.0 https://github.com/expertmm/travelnet"/>
|
||||||
|
<tag name="ARTIST" value="expertmm"/>
|
||||||
|
</tags>
|
BIN
etc/travelnet_travel.mmpz
Normal file
BIN
etc/travelnet_travel.mmpz
Normal file
Binary file not shown.
7
etc/travelnet_travel.xml
Normal file
7
etc/travelnet_travel.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<tags>
|
||||||
|
<tag name="Software" value="LMMS (libsndfile-1.0.26pre5)"/>
|
||||||
|
<tag name="YEAR" value="2017-05-25"/>
|
||||||
|
<tag name="TITLE" value="travelnet travel"/>
|
||||||
|
<tag name="COMMENTS" value="CC-BY-SA 3.0 https://github.com/expertmm/travelnet"/>
|
||||||
|
<tag name="ARTIST" value="expertmm"/>
|
||||||
|
</tags>
|
12
init.lua
12
init.lua
@ -803,7 +803,11 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
|
|||||||
|
|
||||||
|
|
||||||
if( travelnet.travelnet_sound_enabled ) then
|
if( travelnet.travelnet_sound_enabled ) then
|
||||||
minetest.sound_play("128590_7037-lq.mp3", {pos = pos, gain = 1.0, max_hear_distance = 10,})
|
if ( this_node.name == 'travelnet:elevator' ) then
|
||||||
|
minetest.sound_play("travelnet_bell", {pos = pos, gain = 0.75, max_hear_distance = 10,});
|
||||||
|
else
|
||||||
|
minetest.sound_play("travelnet_travel", {pos = pos, gain = 0.75, max_hear_distance = 10,});
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if( travelnet.travelnet_effect_enabled ) then
|
if( travelnet.travelnet_effect_enabled ) then
|
||||||
minetest.add_entity( {x=pos.x,y=pos.y+0.5,z=pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns
|
minetest.add_entity( {x=pos.x,y=pos.y+0.5,z=pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns
|
||||||
@ -817,7 +821,11 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
|
|||||||
player:moveto( target_pos, false);
|
player:moveto( target_pos, false);
|
||||||
|
|
||||||
if( travelnet.travelnet_sound_enabled ) then
|
if( travelnet.travelnet_sound_enabled ) then
|
||||||
minetest.sound_play("travelnet_travel.wav", {pos = target_pos, gain = 1.0, max_hear_distance = 10,})
|
if ( this_node.name == 'travelnet:elevator' ) then
|
||||||
|
minetest.sound_play("travelnet_bell", {pos = pos, gain = 0.75, max_hear_distance = 10,});
|
||||||
|
else
|
||||||
|
minetest.sound_play("travelnet_travel", {pos = target_pos, gain = 0.75, max_hear_distance = 10,})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if( travelnet.travelnet_effect_enabled ) then
|
if( travelnet.travelnet_effect_enabled ) then
|
||||||
minetest.add_entity( {x=target_pos.x,y=target_pos.y+0.5,z=target_pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns
|
minetest.add_entity( {x=target_pos.x,y=target_pos.y+0.5,z=target_pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns
|
||||||
|
BIN
sounds/travelnet_bell.ogg
Normal file
BIN
sounds/travelnet_bell.ogg
Normal file
Binary file not shown.
BIN
sounds/travelnet_travel.ogg
Normal file
BIN
sounds/travelnet_travel.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user