NOVAS TEXTURAS E FUNCIONALIDADE

* A máquina dispensadora e o cofre ganharam novas texturas
* O cofre ganhou dois novos botões que ainda não funcionam.
* A dispensadora ganhou um botão de salvar anuncio. (Porque no celular não era possivel salvar).
This commit is contained in:
Lunovox Heavenfinder 2020-04-14 21:23:44 -03:00
parent 62ad32b2ee
commit 3ecd89974b
9 changed files with 143 additions and 83 deletions

37
api.lua
View file

@ -74,18 +74,30 @@ end
modMinerTrade.getFormspec = function(playername, title)
if not title then title = "" end
local formspec = "size[8,9]"
.."bgcolor[#636D76FF;false]"
local formspec = "size[9.5,10.5]"
--.."bgcolor[#636D76FF;false]"
--..default.gui_bg
--..default.gui_bg_img
..default.gui_slots
--..default.gui_slots
--.."bgcolor[#636D76FF;false]"
.."background[-0.25,-0.25;10,11;safe_inside.png]"
--listcolors[slot_bg_normal;slot_bg_hover;slot_border;tooltip_bgcolor;tooltip_fontcolor]
.."listcolors[#3a4044CC;#636e7533;#74acd288;#CCCC00;#FFFFFF]"
.."label[0,0;"..minetest.formspec_escape(title).."]"
.."list[detached:safe_"..playername .. ";safe;"
..((8 - modMinerTrade.size.width)/2)..","..(((4 - modMinerTrade.size.height)/2)+0.62)..";"
..((9.5 - modMinerTrade.size.width)/2)..","..(((4.6 - 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;]"
.."list[current_player;main;0.75,6.25;8,4;]"
.."button[0.75,5.25;3,1;btnRemoveAll;"..minetest.formspec_escape(modMinerTrade.translate("REMOVE ALL")).."]"
.."tooltip[btnRemoveAll;"..minetest.formspec_escape(modMinerTrade.translate("Button under development (still not working)"))..";#CCCC00;#000000]"
.."button[5.75,5.25;3,1;btnDepositAll;"..minetest.formspec_escape(modMinerTrade.translate("DEPOSIT ALL")).."]"
.."tooltip[btnDepositAll;"..minetest.formspec_escape(modMinerTrade.translate("Button under development (still not working)"))..";#CCCC00;#000000]"
.."listring[detached:safe_"..playername .. ";safe]"
.."listring[current_player;main]"
return formspec
@ -167,11 +179,22 @@ modMinerTrade.floor_pos = function(pos)
}
end
modMinerTrade.getPosMachineName = function(pos)
if type(posMachine)=="table" and type(posMachine.x)=="number" and type(posMachine.y)=="number" and type(posMachine.z)=="number" then
return minetest.pos_to_string(modMinerTrade.floor_pos(posMachine))
else
minetest.log(
"error",("[modMinerTrade.sendMailMachine(pos='%s')] "):format(dump(posMachine), dump(ownername), dump(message))
..modMinerTrade.translate("The '%s' parameter must be of the position type (x,y,z)!"):format("pos")
)
end
end
modMinerTrade.sendMailMachine = function(posMachine, ownername, message)
if minetest.get_modpath("correio") then
local mailMachineInterval = (60*60)
if type(posMachine)=="table" and type(posMachine.x)=="number" and type(posMachine.y)=="number" and type(posMachine.z)=="number" then
local posMachineName = minetest.pos_to_string(modMinerTrade.floor_pos(posMachine))
local posMachineName = modMinerTrade.getPosMachineName(posMachine)
if type(ownername)=="string" and ownername:trim()~="" and minetest.player_exists(ownername) then --Checks whether the owner really exists.
if type(message)=="string" and message:trim()~="" then
local agora = os.time()
@ -211,7 +234,7 @@ modMinerTrade.sendMailMachine = function(posMachine, ownername, message)
else
minetest.log(
"error",("[modMinerTrade.sendMailMachine(posMachine='%s', ownername='%s', message='%s')] "):format(dump(posMachine), dump(ownername), dump(message))
..modMinerTrade.translate("The 'posMachine' parameter must be of the position type (x,y,z)!")
..modMinerTrade.translate("The '%s' parameter must be of the position type (x,y,z)!"):format("posMachine")
)
end
end --if minetest.get_modpath("correio") then

View file

@ -5,13 +5,10 @@ modMinerTrade.dispensing.formspec = {
customer = function(pos)
local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z
local formspec = "size[8,10.5]"
--..default.gui_bg
--..default.gui_bg_img
--..default.gui_slots
.."bgcolor[#004400DD;false]"
--.."background[-0.5,0;8.5,11;dispensador_frente.png]"
--.."bgcolor[#00880033;false]"
.."background[-0.25,-0.25;8.50,11.50;dispensador_traz.png]"
--listcolors[slot_bg_normal;slot_bg_hover;slot_border;tooltip_bgcolor;tooltip_fontcolor]
.."listcolors[#00000055;#008800;#FFFFFF]"
.."listcolors[#004400EE;#008800;#00FF00;#CCCC00;#FFFFFF]"
.."label[2,-0.25;"..minetest.formspec_escape(modMinerTrade.translate("DISPENSING MACHINE")).."]"
.."label[0,0.25;"..minetest.formspec_escape("* "..minetest.env:get_meta(pos):get_string("offer")).."]"
@ -43,10 +40,10 @@ modMinerTrade.dispensing.formspec = {
owner = function(pos)
local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z
local formspec = "size[8,11]"
.."bgcolor[#000000CC;false]"
--.."bgcolor[#00880033;false]"
.."background[-0.25,-0.25;8.50,11.50;dispensador_traz.png]"
--listcolors[slot_bg_normal;slot_bg_hover;slot_border;tooltip_bgcolor;tooltip_fontcolor]
.."listcolors[#88888844;#888888;#FFFFFF]"
.."listcolors[#004400EE;#008800;#00FF00;#CCCC00;#FFFFFF]"
.."label[0,0;"..minetest.formspec_escape(modMinerTrade.translate("Items Received (Your Profit)"))..":]"
.."list["..list_name..";customers_gave;0,0.5;3,2;]"
.."label[0,2.5;"..minetest.formspec_escape(modMinerTrade.translate("Stock to Offer"))..":]"
@ -57,11 +54,13 @@ modMinerTrade.dispensing.formspec = {
.."list["..list_name..";owner_gives;5,3;3,2;]"
--.."label[0,5;Proprietario: Pressione (E) + Botao(RMB) no Mouse para a interface com o cliente]"
--.."label[0,5;Vendedor: Evite o estoque baixo e guardar lucros no balcao.]"
.."field[0.29,5.75;8,0.85;txtOffer;"
.."field[0.29,5.75;7.25,0.85;txtOffer;"
..minetest.formspec_escape(modMinerTrade.translate("Make an announcement about what this machine will do"))..":;"
..minetest.formspec_escape(
minetest.env:get_meta(pos):get_string("offer")
).."]"
.."image_button_exit[7.25,5.4;0.8,0.8;sbl_disket.png;btnSaveText;]"
.."tooltip[btnSaveText;"..minetest.formspec_escape(modMinerTrade.translate("Save The Announcement"))..";#CCCC00;#000000]"
.."label[0,6.25;"..minetest.formspec_escape(modMinerTrade.translate("Seller current inventory"))..":]"
.."list[current_player;main;0,6.75.0;8,4;]"
.."label[0,10.75;("..minetest.formspec_escape(modMinerTrade.translate("Ctrl + Right Click Mouse → Customer Interface"))..")]"
@ -295,6 +294,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
..modMinerTrade.translate("Dispending done!")
)
minetest.sound_play("sfx_cash_register", {object=sender, max_hear_distance=5.0,})
modMinerTrade.machine_flags[modMinerTrade.getPosMachineName(posMachine)].lastalert = 0 --0 = Can sedn emails
else
if error_name == "owners_fault" then
minetest.errorDispensing(

View file

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-13 18:43-0300\n"
"PO-Revision-Date: 2020-04-13 18:57-0300\n"
"POT-Creation-Date: 2020-04-14 21:11-0300\n"
"PO-Revision-Date: 2020-04-14 21:19-0300\n"
"Last-Translator: Lunovox Heavenfinder <lunovox@disroot.org>\n"
"Language-Team: \n"
"Language: pt\n"
@ -32,23 +32,40 @@ msgstr "O arquivo '%s' não esta no formato de tabela!"
msgid "Opening '%s'!"
msgstr "Abrindo '%s'!"
#: api.lua:132
#: api.lua:96
msgid "REMOVE ALL"
msgstr "SACAR TUDO"
#: api.lua:97 api.lua:99
msgid "Button under development (still not working)"
msgstr "Botão em desenvolvimento (ainda não está funcionando)"
#: api.lua:98
msgid "DEPOSIT ALL"
msgstr "DEPOSITAR TUDO"
#: api.lua:144
#, lua-format
msgid "Player '%s' has placed %02d '%s' in his safe!"
msgstr "O jogador '%s' colocou %02d '%s' em seu cofre!"
#: api.lua:136
#: api.lua:148
#, lua-format
msgid "Player '%s' has removed %02d '%s' in his safe!"
msgstr "O jogador '%s' retirou %02d '%s' em seu cofre!"
#: api.lua:182 api.lua:224 item_dispensing_machine.lua:16
#: item_dispensing_machine.lua:204 item_dispensing_machine.lua:222
#: item_dispensing_machine.lua:294
#: api.lua:188 api.lua:237
#, lua-format
msgid "The '%s' parameter must be of the position type (x,y,z)!"
msgstr "O parâmetro '%s' deve ser do tipo de POSITION (x,y,z)!"
#: api.lua:205 api.lua:247 item_dispensing_machine.lua:13
#: item_dispensing_machine.lua:203 item_dispensing_machine.lua:221
#: item_dispensing_machine.lua:293
msgid "DISPENSING MACHINE"
msgstr "MÁQUINA DE DISPENSADORA"
#: api.lua:188
#: api.lua:211
#, lua-format
msgid ""
"A letter was sent by the dispensing machine '%s' to '%s' advising about '%s'!"
@ -56,7 +73,7 @@ msgstr ""
"Uma carta foi enviada pela Máquina Dispensadora '%s' para '%s' informando "
"sobre '%s'!"
#: api.lua:194
#: api.lua:217
msgid ""
"Due to an unknown error, it was not possible to send an email through the "
"dispensing machine!"
@ -64,15 +81,11 @@ msgstr ""
"Devido a um erro desconhecido, não foi possível enviar um email através da "
"Máquina Dispensadora!"
#: api.lua:202 api.lua:208 api.lua:233
#: api.lua:225 api.lua:231 api.lua:256
#, lua-format
msgid "The '%s' parameter must be of the non-empty string type!"
msgstr "O parâmetro '%s' deve ser do tipo de STRING não vazia!"
#: api.lua:214
msgid "The 'posMachine' parameter must be of the position type (x,y,z)!"
msgstr "O parâmetro 'posMachine' deve ser do tipo de POSITION (x,y,z)!"
#: commands.lua:2 commands.lua:9 commands.lua:27
msgid "Lets you check the contents of another players strongbox."
msgstr "Permite verificar o conteúdo do cofre de outro jogador."
@ -129,59 +142,63 @@ msgstr "O Caixa Eletrônico só vai funcionar %02d segundos depois de instalado!
msgid "atm"
msgstr "caixaeletronico"
#: item_dispensing_machine.lua:19
#: item_dispensing_machine.lua:16
msgid "Customer Offer"
msgstr "Cliente Oferece"
#: item_dispensing_machine.lua:22
#: item_dispensing_machine.lua:19
msgid "Customer Receive"
msgstr "Cliente Recebe"
#: item_dispensing_machine.lua:25
#: item_dispensing_machine.lua:22
msgid "ACCEPT"
msgstr "ACEITAR"
#: item_dispensing_machine.lua:27
#: item_dispensing_machine.lua:24
msgid "Current customer inventory"
msgstr "Inventário atual do cliente"
#: item_dispensing_machine.lua:32
#: item_dispensing_machine.lua:29
msgid "The Machine Need"
msgstr "Máquina Precisa"
#: item_dispensing_machine.lua:35
#: item_dispensing_machine.lua:32
msgid "The Machine Offer"
msgstr "Máquina Oferece"
#: item_dispensing_machine.lua:50
#: item_dispensing_machine.lua:47
msgid "Items Received (Your Profit)"
msgstr "Itens Recebido (Seu Lucro)"
msgstr "Recebido (Seu Lucro)"
#: item_dispensing_machine.lua:52
#: item_dispensing_machine.lua:49
msgid "Stock to Offer"
msgstr "Estoque a Oferetar"
#: item_dispensing_machine.lua:54
#: item_dispensing_machine.lua:51
msgid "You need"
msgstr "Você Precisa"
#: item_dispensing_machine.lua:56
#: item_dispensing_machine.lua:53
msgid "You offer"
msgstr "Você Oferece"
#: item_dispensing_machine.lua:61
#: item_dispensing_machine.lua:58
msgid "Make an announcement about what this machine will do"
msgstr "Faça um anúncio sobre o que esta máquina dispensará"
#: item_dispensing_machine.lua:65
#: item_dispensing_machine.lua:63
msgid "Save The Announcement"
msgstr "Salvar o anúncio"
#: item_dispensing_machine.lua:64
msgid "Seller current inventory"
msgstr "Inventario atual do vendedor"
#: item_dispensing_machine.lua:67
#: item_dispensing_machine.lua:66
msgid "Ctrl + Right Click Mouse → Customer Interface"
msgstr "Ctrl + Clique Direito do Mouse → Interface do Cliente"
#: item_dispensing_machine.lua:132
#: item_dispensing_machine.lua:131
msgid ""
"DISPENSING MACHINE\n"
"* Sells your items, even if you are not online."
@ -189,21 +206,21 @@ msgstr ""
"MÁQUINA DE DISPENSADORA\n"
"* Vende seus itens, mesmo se você não estiver online."
#: item_dispensing_machine.lua:155 item_dispensing_machine.lua:233
#: item_dispensing_machine.lua:238
#: item_dispensing_machine.lua:154 item_dispensing_machine.lua:232
#: item_dispensing_machine.lua:237
#, lua-format
msgid "Dispensing Machine of '%s'."
msgstr "Maquina Dispensadora de '%s'."
#: item_dispensing_machine.lua:205
#: item_dispensing_machine.lua:204
msgid "The Dispensing Machine can not be removed before being emptied!"
msgstr "A Máquina Dispensadora não pode ser retirada antes de ser esvaziada!"
#: item_dispensing_machine.lua:223
#: item_dispensing_machine.lua:222
msgid "You can not change your own machine!"
msgstr "Você não pode trocar na sua própria maquina!"
#: item_dispensing_machine.lua:295
#: item_dispensing_machine.lua:294
msgid "Dispending done!"
msgstr "Dispensa Concluida!"
@ -433,5 +450,8 @@ msgstr ""
msgid "The city hall deposited the %2d° salary in your bank account!"
msgstr "A prefeitura depositou o %2d° salário em sua conta bancária!"
#~ msgid "Save Machine Name"
#~ msgstr "Salva o nome da máquina"
#~ msgid "The stock of '%s' is gone. Contact him!"
#~ msgstr "O estoque de '%s' acabou. Contacte-o!"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-13 18:43-0300\n"
"POT-Creation-Date: 2020-04-14 21:11-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -31,43 +31,56 @@ msgstr ""
msgid "Opening '%s'!"
msgstr ""
#: api.lua:132
#: api.lua:96
msgid "REMOVE ALL"
msgstr ""
#: api.lua:97 api.lua:99
msgid "Button under development (still not working)"
msgstr ""
#: api.lua:98
msgid "DEPOSIT ALL"
msgstr ""
#: api.lua:144
#, lua-format
msgid "Player '%s' has placed %02d '%s' in his safe!"
msgstr ""
#: api.lua:136
#: api.lua:148
#, lua-format
msgid "Player '%s' has removed %02d '%s' in his safe!"
msgstr ""
#: api.lua:182 api.lua:224 item_dispensing_machine.lua:16
#: item_dispensing_machine.lua:204 item_dispensing_machine.lua:222
#: item_dispensing_machine.lua:294
#: api.lua:188 api.lua:237
#, lua-format
msgid "The '%s' parameter must be of the position type (x,y,z)!"
msgstr ""
#: api.lua:205 api.lua:247 item_dispensing_machine.lua:13
#: item_dispensing_machine.lua:203 item_dispensing_machine.lua:221
#: item_dispensing_machine.lua:293
msgid "DISPENSING MACHINE"
msgstr ""
#: api.lua:188
#: api.lua:211
#, lua-format
msgid ""
"A letter was sent by the dispensing machine '%s' to '%s' advising about '%s'!"
msgstr ""
#: api.lua:194
#: api.lua:217
msgid ""
"Due to an unknown error, it was not possible to send an email through the "
"dispensing machine!"
msgstr ""
#: api.lua:202 api.lua:208 api.lua:233
#: api.lua:225 api.lua:231 api.lua:256
#, lua-format
msgid "The '%s' parameter must be of the non-empty string type!"
msgstr ""
#: api.lua:214
msgid "The 'posMachine' parameter must be of the position type (x,y,z)!"
msgstr ""
#: commands.lua:2 commands.lua:9 commands.lua:27
msgid "Lets you check the contents of another players strongbox."
msgstr ""
@ -116,79 +129,83 @@ msgstr ""
msgid "atm"
msgstr ""
#: item_dispensing_machine.lua:19
#: item_dispensing_machine.lua:16
msgid "Customer Offer"
msgstr ""
#: item_dispensing_machine.lua:22
#: item_dispensing_machine.lua:19
msgid "Customer Receive"
msgstr ""
#: item_dispensing_machine.lua:25
#: item_dispensing_machine.lua:22
msgid "ACCEPT"
msgstr ""
#: item_dispensing_machine.lua:27
#: item_dispensing_machine.lua:24
msgid "Current customer inventory"
msgstr ""
#: item_dispensing_machine.lua:32
#: item_dispensing_machine.lua:29
msgid "The Machine Need"
msgstr ""
#: item_dispensing_machine.lua:35
#: item_dispensing_machine.lua:32
msgid "The Machine Offer"
msgstr ""
#: item_dispensing_machine.lua:50
#: item_dispensing_machine.lua:47
msgid "Items Received (Your Profit)"
msgstr ""
#: item_dispensing_machine.lua:52
#: item_dispensing_machine.lua:49
msgid "Stock to Offer"
msgstr ""
#: item_dispensing_machine.lua:54
#: item_dispensing_machine.lua:51
msgid "You need"
msgstr ""
#: item_dispensing_machine.lua:56
#: item_dispensing_machine.lua:53
msgid "You offer"
msgstr ""
#: item_dispensing_machine.lua:61
#: item_dispensing_machine.lua:58
msgid "Make an announcement about what this machine will do"
msgstr ""
#: item_dispensing_machine.lua:65
#: item_dispensing_machine.lua:63
msgid "Save The Announcement"
msgstr ""
#: item_dispensing_machine.lua:64
msgid "Seller current inventory"
msgstr ""
#: item_dispensing_machine.lua:67
#: item_dispensing_machine.lua:66
msgid "Ctrl + Right Click Mouse → Customer Interface"
msgstr ""
#: item_dispensing_machine.lua:132
#: item_dispensing_machine.lua:131
msgid ""
"DISPENSING MACHINE\n"
"* Sells your items, even if you are not online."
msgstr ""
#: item_dispensing_machine.lua:155 item_dispensing_machine.lua:233
#: item_dispensing_machine.lua:238
#: item_dispensing_machine.lua:154 item_dispensing_machine.lua:232
#: item_dispensing_machine.lua:237
#, lua-format
msgid "Dispensing Machine of '%s'."
msgstr ""
#: item_dispensing_machine.lua:205
#: item_dispensing_machine.lua:204
msgid "The Dispensing Machine can not be removed before being emptied!"
msgstr ""
#: item_dispensing_machine.lua:223
#: item_dispensing_machine.lua:222
msgid "You can not change your own machine!"
msgstr ""
#: item_dispensing_machine.lua:295
#: item_dispensing_machine.lua:294
msgid "Dispending done!"
msgstr ""

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
textures/safe_inside.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
textures/sbl_disket.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B