Added logging for withdrawals and deposits

This commit is contained in:
Vitalie Ciubotaru
2016-03-06 23:03:00 +09:00
parent aed5aa6024
commit 46db5d727b
3 changed files with 9 additions and 2 deletions

View File

@ -201,8 +201,9 @@ minetest.after(0, function()
on_put = function(inv, listname, index, stack, player)
local p_name = player:get_player_name()
if listname == 'money' and minetest.get_item_group(stack:get_name(), 'minegeld') then
local old_balance = exchange:get_balance(p_name)
local balance = bills2balance(stack, p_name)
exchange:set_balance(p_name, balance)
exchange:change_balance(p_name, balance - old_balance)
local stacks = inv:get_list('money')
local tens = math.floor(balance/10)
if tens > 0 then