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:
parent
409374e0f2
commit
338d91aff5
1
atm.lua
1
atm.lua
|
@ -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,
|
||||
})
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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.
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue