Added the sound of inputting PIN code to ATM's on_rightclick(), and the cound of counting cash at cash deposit and withdrawal

This commit is contained in:
Vitalie Ciubotaru 2016-03-20 23:12:00 +09:00
parent 409374e0f2
commit 338d91aff5
No known key found for this signature in database
GPG Key ID: 6B60758D4DF9A7EE
5 changed files with 5 additions and 0 deletions

View File

@ -244,6 +244,7 @@ minetest.register_node("global_exchange:atm_bottom", {
end,
groups = {cracky=2, atm = 1},
on_rightclick = function(pos, _, clicker)
minetest.sound_play("atm_beep", {pos = pos})
minetest.show_formspec(clicker:get_player_name(), atm_form, main_menu(clicker:get_player_name()))
end,
})

View File

@ -204,6 +204,7 @@ minetest.after(0, function()
local old_balance = exchange:get_balance(p_name)
local balance = bills2balance(stack, p_name)
exchange:change_balance(p_name, balance - old_balance)
minetest.sound_play("atm_cash", {to_player = p_name})
local stacks = inv:get_list('money')
local tens = math.floor(balance/10)
if tens > 0 then
@ -250,6 +251,7 @@ minetest.after(0, function()
delta = count * 10
end
exchange:change_balance(p_name, -delta) --let's hope it always returns success
minetest.sound_play("atm_cash", {to_player = p_name})
end
minetest.show_formspec(p_name, "global_exchange:atm_form", cash_fs(p_name)) --redraw with new balance
end,

2
sounds/LICENSE Normal file
View File

@ -0,0 +1,2 @@
File atm_beep.ogg is a derivative work from a sound file 'dialing 3.aiff' uploaded by 'benjaminharveydesign' to http://freesound.org under a Creative Commons 0 license.
File atm_cash.ogg is a derivative work from a sound file 'ATM.wav' uploaded by 'LG' to http://freesound.org under a Creative Commons Attribution license.

BIN
sounds/atm_beep.ogg Normal file

Binary file not shown.

BIN
sounds/atm_cash.ogg Normal file

Binary file not shown.