Inicio da Função de Emprestimos. (Incompleta)

This commit is contained in:
Lunovox 2022-06-08 09:23:18 -03:00
parent 6cd4c51749
commit 5b687d1177
25 changed files with 46 additions and 12 deletions

View file

@ -279,6 +279,7 @@ modMinerTrade.showAccountBank = {
.. "box[0.00,0.10;5.50,9.5;#000000]"
.. "button[0.25,0.50;5.00,0.5;btnBalance;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("BALANCE"))).."]"
.. "button[0.25,1.25;5.00,0.5;btnStatement;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("STATEMENT"))).."]"
.. "button[0.25,3.50;5.00,0.5;btnTransfers;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("TRANSFERS"))).."]"
if
accountmode~=nil
and type(accountmode) == "string"
@ -287,13 +288,12 @@ modMinerTrade.showAccountBank = {
formspec = formspec
.. "button[0.25,2.00;5.00,0.5;btnDeposits;"..minetest.formspec_escape(core.colorize("#FFFFF", modMinerTrade.translate("DEPOSITS"))).."]"
.. "button[0.25,2.75;5.00,0.5;btnWithdrawals;"..minetest.formspec_escape(core.colorize("#FFFFF", modMinerTrade.translate("WITHDRAWALS"))).."]" -- [DINHEIRO E CHECK]
.. "button[0.25,3.50;5.00,0.5;btnTransfers;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("TRANSFERS"))).."]"
if minetest.get_player_privs(playername).developer then
formspec = formspec
.. "button[0.25,5.00;5.00,0.5;btnCreditCard;"..minetest.formspec_escape(core.colorize("#888888", modMinerTrade.translate("CREDIT CARD"))).."]" -- [EXPEDIR E MUDAR SENHA]
.. "button[0.25,4.25;5.00,0.5;btnLoans;"..minetest.formspec_escape(core.colorize("#888888", modMinerTrade.translate("LOANS"))).."]" --Emprestimos
.. "button[0.25,5.75;5.00,0.5;btnSetings;"..minetest.formspec_escape(core.colorize("#888888", modMinerTrade.translate("SETTINGS"))).."]" --Se quer ou não uma senha, se quer receber uma carta quando houver uma nova movimentacao.
end
end
if minetest.get_player_privs(playername).developer then
formspec = formspec
.. "button[0.25,5.00;5.00,0.5;btnCreditCard;"..minetest.formspec_escape(core.colorize("#888888", modMinerTrade.translate("CREDIT CARD"))).."]" -- [EXPEDIR E MUDAR SENHA]
.. "button[0.25,4.25;5.00,0.5;btnLoans;"..minetest.formspec_escape(core.colorize("#888888", modMinerTrade.translate("LOANS"))).."]" --Emprestimos
.. "button[0.25,5.75;5.00,0.5;btnSetings;"..minetest.formspec_escape(core.colorize("#888888", modMinerTrade.translate("SETTINGS"))).."]" --Se quer ou não uma senha, se quer receber uma carta quando houver uma nova movimentacao.
end
formspec = formspec
.."button_exit[0.25,6.50;5.00,0.5;;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("EXIT"))).."]"
@ -343,7 +343,7 @@ modMinerTrade.showAccountBank = {
formspec
)
end,
frmStatement = function(playername, selStatement) --FORMULÁRIO: SALDO
frmStatement = function(playername, selStatement) --FORMULÁRIO: EXTRATO
local accountname = modMinerTrade.bank.player[playername].focused_accountname
local formspec = "size[16,10]"
.."bgcolor[#636D7644;false]"
@ -436,7 +436,7 @@ modMinerTrade.showAccountBank = {
formspec
)
end,
frmWithdrawals = function(playername) --FORMULÁRIO: SAQUE
frmWithdrawals = function(playername) --FORMULÁRIO: FORMAS DE SAQUE
local accountname = modMinerTrade.bank.player[playername].focused_accountname
local formspec = "size[16,10]"
.."bgcolor[#636D7688;false]"
@ -468,7 +468,7 @@ modMinerTrade.showAccountBank = {
modMinerTrade.doSoundPlayer(playername, "sfx_atm", 5)
minetest.show_formspec(playername, "frmAtmWithdrawals", formspec)
end,
frmGiveCash = function(playername, txtValue, msgDetails) --FORMULÁRIO: SAQUE
frmGiveCash = function(playername, txtValue, msgDetails) --FORMULÁRIO: SAQUE EM DINHEIRO
local accountname = modMinerTrade.bank.player[playername].focused_accountname
--modMinerTrade.debug("modMinerTrade.showAccountBank.frmGiveCash() >>> playername = "..playername.." | txtValue = "..dump(txtValue).." | msgDetails = "..dump(msgDetails))
@ -520,7 +520,7 @@ modMinerTrade.showAccountBank = {
end
minetest.show_formspec(playername, "frmAtmGiveCash", formspec)
end,
frmDeposits = function(playername) --FORMULÁRIO: SAQUE
frmDeposits = function(playername) --FORMULÁRIO: DEPÓSITOS
local accountname = modMinerTrade.bank.player[playername].focused_accountname
-- playername = player:get_player_name()
local newInv = minetest.create_detached_inventory("deposits_"..accountname, {
@ -633,7 +633,7 @@ modMinerTrade.showAccountBank = {
minetest.show_formspec(playername, "frmAtmDeposits", formspec)
end,
frmTransfer = function(playername, txtBeneficiary, txtValue, txtReason, msgDetails) --FORMULÁRIO: SAQUE
frmTransfer = function(playername) --FORMULÁRIO: TRANSFERÊNCIAS
local accountname = modMinerTrade.bank.player[playername].focused_accountname
--modMinerTrade.debug("modMinerTrade.showAccountBank.frmTransfer() >>> playername = "..dump(playername).." | accountname = "..dump(accountname).." | txtBeneficiary = "..dump(txtBeneficiary).." | txtValue = "..dump(txtValue).." | txtReason = "..dump(txtReason).." | msgDetails = "..dump(msgDetails))
@ -709,6 +709,40 @@ modMinerTrade.showAccountBank = {
end
minetest.show_formspec(playername, "frmAtmTransfer", formspec)
end,
frmLoans = function(playername, txtBeneficiary, txtValue, txtReason, msgDetails) --FORMULÁRIO: FUNÇÕES DE EMPRESTIMO
local accountname = modMinerTrade.bank.player[playername].focused_accountname
local formspec = "size[16,10]"
.."bgcolor[#636D7688;false]"
--.."bgcolor[#636D76FF;false]"
--..default.gui_bg
--..default.gui_bg_img
--..default.gui_slots
.. "box[0.00,0.10;5.50,9.5;#000000]"
.. "button[0.25,0.50;5.00,0.5;btnAtmMain;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("BACK"))).."]"
.."button_exit[0.25,6.50;5.00,0.5;;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("EXIT"))).."]"
.."background[6.0,0.25;9.5,9.5;text_atm_front.png]"
.. "box[6.0,0.25;9.5,9.5;#000000CC]"
.. "label[6.75,0.75;"..minetest.formspec_escape(core.colorize("#00FFFF", modMinerTrade.translate("LOAN FUNCTIONS")..":")).."]"
.. "label[9.25,3.25;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("NEW LOANS AVAILABLE"))).."]"
.."tooltip[btnMinercoin;"..minetest.formspec_escape(modMinerTrade.translate("List of all loan offers that you can take advantage of at low cost."))..";#CCCC0088;#000000]"
.."image_button[7.25,2.50;2.00,2.00;obj_moneysuitcase.png;btnLoansAvailable;]"
.. "label[9.25,5.75;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("LOANS WITH PENDING RETURNS"))).."]"
.."tooltip[btnMinercoin;"..minetest.formspec_escape(modMinerTrade.translate("List of all loans you have taken and that are still pending repayment."))..";#CCCC0088;#000000]"
.."image_button[7.25,5.00;2.00,2.00;obj_credit_card.png;btnLoansPendingReturns;]"
.. "label[9.25,8.25;"..minetest.formspec_escape(core.colorize("#FFFFFF", modMinerTrade.translate("RULES FOR LOANS"))).."]"
.."tooltip[btnMinercoin;"..minetest.formspec_escape(modMinerTrade.translate("List of all rules for you to have access to a loan."))..";#CCCC0088;#000000]"
.."image_button[7.25,7.50;2.00,2.00;obj_bank_check.png;btnLoansRules;]"
modMinerTrade.doSoundPlayer(playername, "sfx_atm", 5)
minetest.show_formspec(playername, "frmAtmLoanFunctions", formspec)
end,
btnLoans
}
modMinerTrade.getCashTypes = function()

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB