Pondo cabeçalho no formulário de caixa eletronico de de cofre.

This commit is contained in:
Lunovox 2018-05-07 06:22:58 -03:00
parent 40fc06ae66
commit f8dae88276
4 changed files with 14 additions and 7 deletions

View file

@ -72,17 +72,16 @@ modMinerTrade.getSafeInventory = function(playername)
end
modMinerTrade.getFormspec = function(playername)
--local playername = player:get_player_name()
modMinerTrade.getFormspec = function(playername, title)
if not title then title = "" end
local formspec = "size[8,9]"
.."bgcolor[#636D76FF;false]"
--..default.gui_bg
--..default.gui_bg_img
..default.gui_slots
--.."list[detached:safe_"..playername .. ";safe;1,1;"..modMinerTrade.size.width..","..modMinerTrade.size.height..";]" -- <= ATENCAO: Nao pode esquecer o prefixo 'detached:xxxxxxx'
.."label[0,0;"..minetest.formspec_escape(title).."]"
.."list[detached:safe_"..playername .. ";safe;"
..((8 - modMinerTrade.size.width)/2)..","..((4 - modMinerTrade.size.height)/2)..";"
..((8 - modMinerTrade.size.width)/2)..","..(((4 - modMinerTrade.size.height)/2)+0.62)..";"
..modMinerTrade.size.width..","..modMinerTrade.size.height
..";]" -- <= ATENCAO: Nao pode esquecer o prefixo 'detached:xxxxxxx'
.."list[current_player;main;0,5;8,4;]"

View file

@ -90,7 +90,10 @@ minetest.register_node("minertrade:atm", {
minetest.show_formspec(
playername,
"safe_"..playername,
modMinerTrade.getFormspec(playername)
modMinerTrade.getFormspec(
playername,
modMinerTrade.translate("PUBLIC ATM - Account of '%s':"):format(playername)
)
)
else
minetest.chat_send_player(playername,

View file

@ -46,7 +46,10 @@ minetest.register_node("minertrade:strongbox", {
minetest.show_formspec(
playername,
"safe_"..ownername,
modMinerTrade.getFormspec(ownername)
modMinerTrade.getFormspec(
ownername,
modMinerTrade.translate("STRONGBOX owned by '%s':"):format(ownername)
)
)
else
minetest.chat_send_player(playername,

View file

@ -54,12 +54,14 @@ STRONGBOX\n* Save your money in this safe and withdraw your money at any shop th
STRONGBOX (Property of '%s')\n* Save your money in this safe and withdraw your money at any shop that has an ATM.=COFRE (Propriedade de '%s')\n* Guarde seu dinheiro neste cofre e retire seu dinheiro em qualquer loja que possua um Caixa Eletrônico.
The safe is going to work %02d seconds after it is installed!=O cofre sá vai funcionar %02d segundos depois de instalado!
You do not have access to the safe belonging to '%s'!=Você não tem acesso ao cofre pertencente a '%s'!
STRONGBOX owned by '%s':=COFRE FORTE de '%s':
#------- item_atm.lua ---------------------------------------------------------------------------
ATM=CAIXA ELETRÔNICO
PUBLIC ATM\n* Save your money in the ATM, and withdraw your money in your Personal Safe or other ATM in the shops scattered around the map.=CAIXA ELETRÔNICO\n* Guarde o seu dinheiro neste Caixa Eletrônico, e retire seu dinheiro em seu Cofre Pessoal ou qualquer outro Caixa Eletrônico nas lojas espalhadas pelo mapa.
You can not install this 'ATM' too far from a 'Dispensing Machine'!=Você não pode instalar este 'Caixa Eletrônico' muito longe de uma 'Máquina Dispensadora'!
The ATM will only run %02d seconds after it is installed!=O Caixa Eletrônico só vai funcionar %02d segundos depois de instalado!
PUBLIC ATM - Account of '%s':=CAIXA ELETRÔNICO - Conta de '%s':
#------- commands.lua ---------------------------------------------------------------------------
checkstrongbox=checacofre