mirror of
https://gitlab.com/lunovox/minertrade.git
synced 2025-03-21 16:01:22 +00:00
Declarando depósito no terminal. (espero que não demasiado verboso)
This commit is contained in:
parent
247dc5cb62
commit
77debf1915
1 changed files with 2 additions and 1 deletions
|
@ -53,12 +53,12 @@ minetest.after(3.5, function()
|
||||||
if #players >= 1 then
|
if #players >= 1 then
|
||||||
if modMinerTrade.bank.last_pay ~= minetest.get_day_count() then
|
if modMinerTrade.bank.last_pay ~= minetest.get_day_count() then
|
||||||
modMinerTrade.bank.last_pay = minetest.get_day_count()
|
modMinerTrade.bank.last_pay = minetest.get_day_count()
|
||||||
|
local description = modMinerTrade.translate("The city hall deposited the %2d° salary in your bank account!"):format(minetest.get_day_count())
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
if minetest.get_player_privs(playername).salary then
|
if minetest.get_player_privs(playername).salary then
|
||||||
if modMinerTrade.isExistAcount(playername) then
|
if modMinerTrade.isExistAcount(playername) then
|
||||||
local value = modMinerTrade.salary.getValue()
|
local value = modMinerTrade.salary.getValue()
|
||||||
local description = modMinerTrade.translate("The city hall deposited the %2d° salary in your bank account!"):format(minetest.get_day_count())
|
|
||||||
modMinerTrade.addBalance(playername, value)
|
modMinerTrade.addBalance(playername, value)
|
||||||
modMinerTrade.addStatement(playername, value, description)
|
modMinerTrade.addStatement(playername, value, description)
|
||||||
minetest.chat_send_player(
|
minetest.chat_send_player(
|
||||||
|
@ -73,6 +73,7 @@ minetest.after(3.5, function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end -- Final off for _, player in ipairs(players) do
|
end -- Final off for _, player in ipairs(players) do
|
||||||
|
minetest.log('action',"[MINERTRADE] "..description)
|
||||||
modMinerTrade.doBankSave()
|
modMinerTrade.doBankSave()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue