* Colorindo mensagens

* Coreção de Traduções
This commit is contained in:
Lunovox 2017-03-23 13:35:54 -03:00
parent face11f024
commit ccbce48dba
4 changed files with 41 additions and 13 deletions

View file

@ -69,7 +69,10 @@ minetest.register_node("minertrade:atm", {
end
itemstack:take_item() -- itemstack:take_item() = Ok
else
minetest.chat_send_player(playername, modMinerTrade.translate("[MINERTRADE] You can not install this 'ATM' too far from a 'Dispensing Machine'!"))
minetest.chat_send_player(playername,
core.colorize("#00ff00", "["..modMinerTrade.translate("ATM").."]: ")
..modMinerTrade.translate("You can not install this 'ATM' too far from a 'Dispensing Machine'!")
)
--return itemstack -- = Cancel
end
@ -90,7 +93,10 @@ minetest.register_node("minertrade:atm", {
modMinerTrade.getFormspec(playername)
)
else
minetest.chat_send_player(playername, modMinerTrade.translate("[MINERTRADE] The ATM will only run %02d seconds after it is installed!"):format(opentime-now))
minetest.chat_send_player(playername,
core.colorize("#00ff00", "["..modMinerTrade.translate("ATM").."]: ")
..modMinerTrade.translate("The ATM will only run %02d seconds after it is installed!"):format(opentime-now)
)
end
end,
})

View file

@ -192,7 +192,9 @@ minetest.register_node("minertrade:dispensingmachine", {
local inv = meta:get_inventory()
local isCanDig = inv:is_empty("stock") and inv:is_empty("customers_gave") and inv:is_empty("owner_wants") and inv:is_empty("owner_gives")
if isCanDig~=true then
minetest.chat_send_player(playername,"[MINERTRADE]: "..modMinerTrade.translate("The Dispensing Machine can not be removed before being emptied!"))
minetest.chat_send_player(playername,
core.colorize("#00ff00", "["..modMinerTrade.translate("DISPENSING MACHINE").."]: ")
..modMinerTrade.translate("The Dispensing Machine can not be removed before being emptied!"))
minetest.sound_play("sfx_alert", {object=player, max_hear_distance=5.0,})
end
return isCanDig
@ -208,7 +210,10 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
--minetest.chat_send_player(name,"owner('"..owner.."') == name('"..name.."')")
if modMinerTrade.dispensing.canOpen(pos, name) and sender:get_player_control().aux1 then
minetest.chat_send_player(name,modMinerTrade.translate("You can not change your own machine!"))
minetest.chat_send_player(name,
core.colorize("#00ff00", "["..modMinerTrade.translate("DISPENSING MACHINE").."]: ")
..modMinerTrade.translate("You can not change your own machine!")
)
minetest.sound_play("sfx_alert", {object=sender, max_hear_distance=5.0,})
return
else
@ -265,13 +270,22 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
minv:remove_item("stock",item)
pinv:add_item("customer_gets",item)
end
minetest.chat_send_player(name,modMinerTrade.translate("Dispending done!"))
minetest.chat_send_player(name,
core.colorize("#00ff00", "["..modMinerTrade.translate("DISPENSING MACHINE").."]: ")
..modMinerTrade.translate("Dispending done!")
)
minetest.sound_play("sfx_cash_register", {object=sender, max_hear_distance=5.0,})
else
if owners_fault then
minetest.chat_send_player(name,modMinerTrade.translate("The stock of '%s' is gone. Contact him!"):format(owner))
minetest.chat_send_player(name,
core.colorize("#00ff00", "["..modMinerTrade.translate("DISPENSING MACHINE").."]: ")
..modMinerTrade.translate("The stock of '%s' is gone. Contact him!"):format(owner)
)
else
minetest.chat_send_player(name,modMinerTrade.translate("The dispending can not be done. Make sure you offer what the machine asks for!"))
minetest.chat_send_player(name,
core.colorize("#00ff00", "["..modMinerTrade.translate("DISPENSING MACHINE").."]: ")
..modMinerTrade.translate("The dispending can not be done. Make sure you offer what the machine asks for!")
)
end
minetest.sound_play("sfx_failure", {object=sender, max_hear_distance=5.0,})
end

View file

@ -49,10 +49,16 @@ minetest.register_node("minertrade:strongbox", {
modMinerTrade.getFormspec(ownername)
)
else
minetest.chat_send_player(playername, modMinerTrade.translate("[MINERTRADE] The safe is going to work %02d seconds after it is installed!"):format(opentime-now))
minetest.chat_send_player(playername,
core.colorize("#00ff00", "["..modMinerTrade.translate("STRONGBOX").."]: ")
..modMinerTrade.translate("The safe is going to work %02d seconds after it is installed!"):format(opentime-now)
)
end
else
minetest.chat_send_player(playername, modMinerTrade.translate("[MINERTRADE] You do not have access to the safe belonging to '%s'!"):format(ownername))
minetest.chat_send_player(playername,
core.colorize("#00ff00", "["..modMinerTrade.translate("STRONGBOX").."]: ")
..modMinerTrade.translate("You do not have access to the safe belonging to '%s'!"):format(ownername)
)
end
end,
})

View file

@ -47,15 +47,17 @@ Cancel=Cancelar
Confirm=Confirmar
#------- item_strongbox.lua ---------------------------------------------------------------------------
STRONGBOX=COFRE
STRONGBOX\n* Save your money in this safe and withdraw your money at any shop that has an ATM.=COFRE\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.
[MINERTRADE] The safe is going to work %02d seconds after it is installed!=[MINERTRADE] O cofre sá vai funcionar %02d segundos depois de instalado!
[MINERTRADE] You do not have access to the safe belonging to '%s'!=[MINERTRADE] Você não tem acesso ao cofre pertencente a '%s'!
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'!
#------- 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.
[MINERTRADE] You can not install this 'ATM' too far from a 'Dispensing Machine'!=[MINERTRADE] Você não pode instalar este 'Caixa Eletrônico' muito longe de uma 'Máquina Dispensadora'!
[MINERTRADE] The ATM will only run %02d seconds after it is installed!=[MINERTRADE] O Caixa Eletrônico só vai funcionar %02d segundos depois de instalado!
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!
#------- commands.lua ---------------------------------------------------------------------------
checkstrongbox=checacofre