From fdb3d55483e34398c15aad3c95340550e33017f2 Mon Sep 17 00:00:00 2001 From: igalan Date: Fri, 18 Apr 2014 05:42:25 +0100 Subject: [PATCH] -Printable transaction logs. --- code/modules/economy/ATM.dm | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 9e0aa81ad6..9eb342d355 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -173,6 +173,7 @@ log transactions dat += "[T.source_terminal]" dat += "" dat += "" + dat += "Print
" if(TRANSFER_FUNDS) dat += "Account balance: $[authenticated_account.money]
" dat += "Back

" @@ -348,6 +349,49 @@ log transactions playsound(loc, 'sound/items/polaroid1.ogg', 50, 1) else playsound(loc, 'sound/items/polaroid2.ogg', 50, 1) + if ("print_transaction") + if(authenticated_account) + var/obj/item/weapon/paper/R = new(src.loc) + R.name = "Transaction logs: [authenticated_account.owner_name]" + R.info = "Transaction logs
" + R.info += "Account holder: [authenticated_account.owner_name]
" + R.info += "Account number: [authenticated_account.account_number]
" + R.info += "Date and time: [worldtime2text()], [current_date_string]

" + R.info += "Service terminal ID: [machine_id]
" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + for(var/datum/transaction/T in authenticated_account.transaction_log) + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "" + R.info += "
DateTimeTargetPurposeValueSource terminal ID
[T.date][T.time][T.target_name][T.purpose]$[T.amount][T.source_terminal]
" + + //stamp the paper + var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') + stampoverlay.icon_state = "paper_stamp-cent" + if(!R.stamped) + R.stamped = new + R.stamped += /obj/item/weapon/stamp + R.overlays += stampoverlay + R.stamps += "
This paper has been stamped by the Automatic Teller Machine." + + if(prob(50)) + playsound(loc, 'sound/items/polaroid1.ogg', 50, 1) + else + playsound(loc, 'sound/items/polaroid2.ogg', 50, 1) + if("insert_card") if(!held_card) //this might happen if the user had the browser window open when somebody emagged it