mirror of
https://gitlab.com/lunovox/minertrade.git
synced 2025-03-15 05:31:20 +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 when = os.date("%Y-%B-%d %Hh:%Mm:%Ss")
|
||||
local title = modMinerTrade.translate("TRANSFER PROOF")
|
||||
local itemDescription = core.colorize("#00FF00", title)
|
||||
local itemDescription = minetest.colorize("#00FF00", title)
|
||||
.."\n"..modMinerTrade.translate("Reason: %s"):format(
|
||||
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("Beneficiary")..": "..txtBeneficiary
|
||||
.."\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
|
||||
|
||||
local Auth = minetest.get_password_hash(
|
||||
|
@ -213,39 +213,33 @@ modMinerTrade.addTransferProof_v2 = function(player, accountname, txtBeneficiary
|
|||
local htmlBody = [[
|
||||
<center>
|
||||
<img name=obj_piggy_bank.png float=center width=96 height=96>
|
||||
<style font=mono color=#FF0000 size=24><b>[MINETEST_BANK]</b></style>
|
||||
[TRANSFER_PROOF]
|
||||
<style font=mono color=#FF0000 size=24><b><minetest_bank/></b></style>
|
||||
<transfer_proof/>
|
||||
</center>
|
||||
|
||||
[DOC_DATA]
|
||||
<doc_data/>
|
||||
|
||||
<center>
|
||||
---------------------------------= [AUTHENTICATION_HASH] =-------------------------------------
|
||||
[AUTH]
|
||||
---------------------------------= AUTHENTICATION HASH =-------------------------------------
|
||||
<transfer_auth/>
|
||||
-----------------------------------------------------------------------------------------------
|
||||
[EXIST_MESSAGE]
|
||||
<exit_message/>
|
||||
</center>
|
||||
]]
|
||||
--[[
|
||||
htmlBody = htmlBody:gsub(
|
||||
"[MINETEST_BANK]",
|
||||
modMinerTrade.translate("MINETEST BANK")
|
||||
)
|
||||
htmlBody = htmlBody:gsub(
|
||||
"[EXIST_MESSAGE]",
|
||||
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)
|
||||
--[[ ]]
|
||||
htmlBody = htmlBody:gsub('<minetest_bank/>', minetest.formspec_escape(modMinerTrade.translate("MINETEST BANK")))
|
||||
htmlBody = htmlBody:gsub('AUTHENTICATION HASH', minetest.formspec_escape(modMinerTrade.translate("AUTHENTICATION HASH")))
|
||||
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('<doc_data/>', minetest.formspec_escape(docData))
|
||||
htmlBody = htmlBody:gsub('<transfer_auth/>', minetest.formspec_escape(Auth))
|
||||
--]]
|
||||
|
||||
--local player = minetest.get_player_by_name(playername)
|
||||
modMinerTrade.addPaperPrinted(player, itemDescription, htmlBody)
|
||||
|
||||
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 objProof = modMinerTrade.getProofStack(playername, accountname, txtBeneficiary, txtValue, txtReason)
|
||||
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.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.showAccountBank.frmTransfer(playername, txtBeneficiary, txtValue, txtReason, msgDetails) --FORMULÁRIO: SAQUE
|
||||
|
|
Loading…
Add table
Reference in a new issue