mirror of
https://gitlab.com/lunovox/minertrade.git
synced 2025-03-21 16:01:22 +00:00
Pondo cabeçalho no formulário de caixa eletronico de de cofre.
This commit is contained in:
parent
40fc06ae66
commit
f8dae88276
4 changed files with 14 additions and 7 deletions
9
api.lua
9
api.lua
|
@ -72,17 +72,16 @@ modMinerTrade.getSafeInventory = function(playername)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
modMinerTrade.getFormspec = function(playername)
|
modMinerTrade.getFormspec = function(playername, title)
|
||||||
--local playername = player:get_player_name()
|
if not title then title = "" end
|
||||||
local formspec = "size[8,9]"
|
local formspec = "size[8,9]"
|
||||||
.."bgcolor[#636D76FF;false]"
|
.."bgcolor[#636D76FF;false]"
|
||||||
--..default.gui_bg
|
--..default.gui_bg
|
||||||
--..default.gui_bg_img
|
--..default.gui_bg_img
|
||||||
..default.gui_slots
|
..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;"
|
.."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
|
..modMinerTrade.size.width..","..modMinerTrade.size.height
|
||||||
..";]" -- <= ATENCAO: Nao pode esquecer o prefixo 'detached:xxxxxxx'
|
..";]" -- <= ATENCAO: Nao pode esquecer o prefixo 'detached:xxxxxxx'
|
||||||
.."list[current_player;main;0,5;8,4;]"
|
.."list[current_player;main;0,5;8,4;]"
|
||||||
|
|
|
@ -90,7 +90,10 @@ minetest.register_node("minertrade:atm", {
|
||||||
minetest.show_formspec(
|
minetest.show_formspec(
|
||||||
playername,
|
playername,
|
||||||
"safe_"..playername,
|
"safe_"..playername,
|
||||||
modMinerTrade.getFormspec(playername)
|
modMinerTrade.getFormspec(
|
||||||
|
playername,
|
||||||
|
modMinerTrade.translate("PUBLIC ATM - Account of '%s':"):format(playername)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(playername,
|
minetest.chat_send_player(playername,
|
||||||
|
|
|
@ -46,7 +46,10 @@ minetest.register_node("minertrade:strongbox", {
|
||||||
minetest.show_formspec(
|
minetest.show_formspec(
|
||||||
playername,
|
playername,
|
||||||
"safe_"..ownername,
|
"safe_"..ownername,
|
||||||
modMinerTrade.getFormspec(ownername)
|
modMinerTrade.getFormspec(
|
||||||
|
ownername,
|
||||||
|
modMinerTrade.translate("STRONGBOX owned by '%s':"):format(ownername)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(playername,
|
minetest.chat_send_player(playername,
|
||||||
|
|
|
@ -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.
|
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!
|
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'!
|
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 ---------------------------------------------------------------------------
|
#------- item_atm.lua ---------------------------------------------------------------------------
|
||||||
ATM=CAIXA ELETRÔNICO
|
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.
|
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'!
|
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!
|
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 ---------------------------------------------------------------------------
|
#------- commands.lua ---------------------------------------------------------------------------
|
||||||
checkstrongbox=checacofre
|
checkstrongbox=checacofre
|
||||||
|
|
Loading…
Add table
Reference in a new issue