Cannot use departmental budget cards as source of credit withdraw (#76113)

Currently you can put cargo's budget card into your PDA, go into NT Pay
and send over the budget to any pay token you want including yours. This
just adds a check to ensure you aren't using that kind of card as
withdrawal source.
This commit is contained in:
Pepsilawn
2023-06-18 10:18:20 +02:00
committed by GitHub
parent 78b7ca9afb
commit dcbe081f64
8 changed files with 16 additions and 10 deletions

View File

@@ -218,7 +218,7 @@
if(!istype(id_card))
computer.say("No ID card detected.")
return
if(istype(id_card, /obj/item/card/id/departmental_budget))
if(IS_DEPARTMENTAL_CARD(id_card))
computer.say("[id_card] cannot be used to make purchases.")
return
account = id_card.registered_account

View File

@@ -20,6 +20,9 @@
/datum/computer_file/program/nt_pay/ui_act(action, list/params, datum/tgui/ui)
switch(action)
if("Transaction")
if(IS_DEPARTMENTAL_ACCOUNT(current_user))
return to_chat(usr, span_notice("The app is unable to withdraw from that card."))
token = params["token"]
money_to_send = params["amount"]
var/datum/bank_account/recipient