Some quick economy fixes and improvements.

This commit is contained in:
Ghommie
2020-05-13 03:31:16 +02:00
parent e0f1b65785
commit 88e499a39a
5 changed files with 25 additions and 14 deletions

View File

@@ -317,14 +317,13 @@
return
if(!alt_click_can_use_id(user))
return
if(registered_account.adjust_money(-amount_to_remove))
amount_to_remove = min(amount_to_remove, registered_account.account_balance)
if(amount_to_remove && registered_account.adjust_money(-amount_to_remove))
var/obj/item/holochip/holochip = new (user.drop_location(), amount_to_remove)
user.put_in_hands(holochip)
to_chat(user, "<span class='notice'>You withdraw [amount_to_remove] credits into a holochip.</span>")
return
else
var/difference = amount_to_remove - registered_account.account_balance
registered_account.bank_card_talk("<span class='warning'>ERROR: The linked account requires [difference] more credit\s to perform that withdrawal.</span>", TRUE)
registered_account.bank_card_talk("<span class='warning'>ERROR: The linked account has no sufficient credits to perform a withdrawal.</span>", TRUE)
/obj/item/card/id/examine(mob/user)
. = ..()