mirror of
https://gitlab.com/lunovox/minertrade.git
synced 2025-03-21 16:01:22 +00:00
[fix] Fix the Paper Printed. (but the texture of background is ugly.)
This commit is contained in:
parent
d60357fd34
commit
7effda9f5c
1 changed files with 18 additions and 24 deletions
42
item_atm.lua
42
item_atm.lua
|
@ -191,7 +191,7 @@ modMinerTrade.addTransferProof_v2 = function(player, accountname, txtBeneficiary
|
||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
local when = os.date("%Y-%B-%d %Hh:%Mm:%Ss")
|
local when = os.date("%Y-%B-%d %Hh:%Mm:%Ss")
|
||||||
local title = modMinerTrade.translate("TRANSFER PROOF")
|
local title = modMinerTrade.translate("TRANSFER PROOF")
|
||||||
local itemDescription = core.colorize("#00FF00", title)
|
local itemDescription = minetest.colorize("#00FF00", title)
|
||||||
.."\n"..modMinerTrade.translate("Reason: %s"):format(
|
.."\n"..modMinerTrade.translate("Reason: %s"):format(
|
||||||
txtReason:sub(1, modMinerTrade.paperprinted.max_title_size)
|
txtReason:sub(1, modMinerTrade.paperprinted.max_title_size)
|
||||||
)
|
)
|
||||||
|
@ -202,7 +202,7 @@ modMinerTrade.addTransferProof_v2 = function(player, accountname, txtBeneficiary
|
||||||
.."\n"..modMinerTrade.translate("Account Holder")..": "..accountname
|
.."\n"..modMinerTrade.translate("Account Holder")..": "..accountname
|
||||||
.."\n"..modMinerTrade.translate("Beneficiary")..": "..txtBeneficiary
|
.."\n"..modMinerTrade.translate("Beneficiary")..": "..txtBeneficiary
|
||||||
.."\n"..modMinerTrade.translate("When")..": "..when
|
.."\n"..modMinerTrade.translate("When")..": "..when
|
||||||
.."\n"..modMinerTrade.translate("Value")..": "..txtValue.." minercash"
|
.."\n"..modMinerTrade.translate("Value")..": "..("%02d"):format(tonumber(txtValue)).." minercash"
|
||||||
.."\n"..modMinerTrade.translate("Transfer Reason")..": "..txtReason
|
.."\n"..modMinerTrade.translate("Transfer Reason")..": "..txtReason
|
||||||
|
|
||||||
local Auth = minetest.get_password_hash(
|
local Auth = minetest.get_password_hash(
|
||||||
|
@ -213,39 +213,33 @@ modMinerTrade.addTransferProof_v2 = function(player, accountname, txtBeneficiary
|
||||||
local htmlBody = [[
|
local htmlBody = [[
|
||||||
<center>
|
<center>
|
||||||
<img name=obj_piggy_bank.png float=center width=96 height=96>
|
<img name=obj_piggy_bank.png float=center width=96 height=96>
|
||||||
<style font=mono color=#FF0000 size=24><b>[MINETEST_BANK]</b></style>
|
<style font=mono color=#FF0000 size=24><b><minetest_bank/></b></style>
|
||||||
[TRANSFER_PROOF]
|
<transfer_proof/>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
[DOC_DATA]
|
<doc_data/>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
---------------------------------= [AUTHENTICATION_HASH] =-------------------------------------
|
---------------------------------= AUTHENTICATION HASH =-------------------------------------
|
||||||
[AUTH]
|
<transfer_auth/>
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
[EXIST_MESSAGE]
|
<exit_message/>
|
||||||
</center>
|
</center>
|
||||||
]]
|
]]
|
||||||
--[[
|
--[[ ]]
|
||||||
htmlBody = htmlBody:gsub(
|
htmlBody = htmlBody:gsub('<minetest_bank/>', minetest.formspec_escape(modMinerTrade.translate("MINETEST BANK")))
|
||||||
"[MINETEST_BANK]",
|
htmlBody = htmlBody:gsub('AUTHENTICATION HASH', minetest.formspec_escape(modMinerTrade.translate("AUTHENTICATION HASH")))
|
||||||
modMinerTrade.translate("MINETEST BANK")
|
htmlBody = htmlBody:gsub('<exit_message/>', minetest.formspec_escape(modMinerTrade.translate("Press <b>ESC</b> to exit this screen!")))
|
||||||
)
|
htmlBody = htmlBody:gsub('<transfer_proof/>', minetest.formspec_escape(title))
|
||||||
htmlBody = htmlBody:gsub(
|
htmlBody = htmlBody:gsub('<doc_data/>', minetest.formspec_escape(docData))
|
||||||
"[EXIST_MESSAGE]",
|
htmlBody = htmlBody:gsub('<transfer_auth/>', minetest.formspec_escape(Auth))
|
||||||
modMinerTrade.translate("Press <b>ESC</b> to exit this screen!")
|
|
||||||
)
|
|
||||||
htmlBody = htmlBody:gsub("[TRANSFER_PROOF]", title)
|
|
||||||
htmlBody = htmlBody:gsub("[DOC_DATA]", docData)
|
|
||||||
htmlBody = htmlBody:gsub("[AUTH]", Auth)
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
--local player = minetest.get_player_by_name(playername)
|
|
||||||
modMinerTrade.addPaperPrinted(player, itemDescription, htmlBody)
|
modMinerTrade.addPaperPrinted(player, itemDescription, htmlBody)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
modMinerTrade.addTransferProof = function(player, accountname, txtBeneficiary, txtValue, txtReason)
|
modMinerTrade.addTransferProof_v1 = function(player, accountname, txtBeneficiary, txtValue, txtReason)
|
||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
local objProof = modMinerTrade.getProofStack(playername, accountname, txtBeneficiary, txtValue, txtReason)
|
local objProof = modMinerTrade.getProofStack(playername, accountname, txtBeneficiary, txtValue, txtReason)
|
||||||
local invPlayer = player:get_inventory()
|
local invPlayer = player:get_inventory()
|
||||||
|
@ -1081,8 +1075,8 @@ modMinerTrade.onReceiveFields = function(player, formname, fields)
|
||||||
modMinerTrade.translate("The '%s' say to '%s': '%s'"):format(playername, txtBeneficiary, txtReason)
|
modMinerTrade.translate("The '%s' say to '%s': '%s'"):format(playername, txtBeneficiary, txtReason)
|
||||||
)
|
)
|
||||||
|
|
||||||
modMinerTrade.addTransferProof(player, accountname, txtBeneficiary, txtValue, txtReason)
|
--modMinerTrade.addTransferProof_v1(player, accountname, txtBeneficiary, txtValue, txtReason)
|
||||||
|
modMinerTrade.addTransferProof_v2(player, accountname, txtBeneficiary, txtValue, txtReason)
|
||||||
|
|
||||||
--modMinerTrade.doSoundPlayer(playername, "sfx_atm", 5)
|
--modMinerTrade.doSoundPlayer(playername, "sfx_atm", 5)
|
||||||
--modMinerTrade.showAccountBank.frmTransfer(playername, txtBeneficiary, txtValue, txtReason, msgDetails) --FORMULÁRIO: SAQUE
|
--modMinerTrade.showAccountBank.frmTransfer(playername, txtBeneficiary, txtValue, txtReason, msgDetails) --FORMULÁRIO: SAQUE
|
||||||
|
|
Loading…
Add table
Reference in a new issue