diff --git a/api.lua b/api.lua index f02a464..c991cba 100644 --- a/api.lua +++ b/api.lua @@ -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;]" diff --git a/item_atm.lua b/item_atm.lua index cbc02fb..d14c146 100644 --- a/item_atm.lua +++ b/item_atm.lua @@ -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, diff --git a/item_strongbox.lua b/item_strongbox.lua index 5a86f21..6ae02bf 100644 --- a/item_strongbox.lua +++ b/item_strongbox.lua @@ -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, diff --git a/locale/pt.txt b/locale/pt.txt index f2f1154..ed4adec 100644 --- a/locale/pt.txt +++ b/locale/pt.txt @@ -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