From ccbce48dba9376731d814891640caffa0f81f693 Mon Sep 17 00:00:00 2001 From: Lunovox Date: Thu, 23 Mar 2017 13:35:54 -0300 Subject: [PATCH] =?UTF-8?q?=20*=20Colorindo=20mensagens=20=20*=20Core?= =?UTF-8?q?=C3=A7=C3=A3o=20de=20Tradu=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- item_atm.lua | 10 ++++++++-- item_dispensing_machine.lua | 24 +++++++++++++++++++----- item_strongbox.lua | 10 ++++++++-- locale/pt.txt | 10 ++++++---- 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/item_atm.lua b/item_atm.lua index 2f3f130..ec1c086 100644 --- a/item_atm.lua +++ b/item_atm.lua @@ -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, }) diff --git a/item_dispensing_machine.lua b/item_dispensing_machine.lua index 6c18907..1acd4df 100644 --- a/item_dispensing_machine.lua +++ b/item_dispensing_machine.lua @@ -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 diff --git a/item_strongbox.lua b/item_strongbox.lua index 435356c..c82140f 100644 --- a/item_strongbox.lua +++ b/item_strongbox.lua @@ -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, }) diff --git a/locale/pt.txt b/locale/pt.txt index 7dd5db3..8cfb717 100644 --- a/locale/pt.txt +++ b/locale/pt.txt @@ -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