diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 494a6568..9048d77b 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -444,7 +444,8 @@ SUBSYSTEM_DEF(job) if(ishuman(H)) var/mob/living/carbon/human/wageslave = H - to_chat(M, "Your account ID is [wageslave.account_id].") + to_chat(M, "Your account ID is [wageslave.account_id]") + to_chat(M, "You do not have a pin, can set your pin at a ATM.") H.add_memory("Your account ID is [wageslave.account_id].") if(job && H) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 99f8035e..99b7c577 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -19,6 +19,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) var/mode = 0 var/printing = null var/target_dept = 0 //Which department this computer has access to. 0=all departments + var/datum/bank_account/account/selectedbank //Cooldown for closing positions in seconds //if set to -1: No cooldown... probably a bad idea @@ -250,6 +251,16 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) dat += "" dat += "" + // Bank management + else if(mode == 4) + dat += {"Return +
| Bank Accounts | [account.account_holder] - [account.account_id]"} + dat += "Assign to ID | " + dat += "
Error, this account number does not exsist, please contact your local administration." - if(!idcard.registered_account.account_pin || pin == idcard.registered_account.account_pin) - dat += "
Balance: $[idcard.registered_account.account_balance]" - dat += "
" - dat += "Withdraw" - dat += "Change Pin" - dat += "Account Settings" - dat += "Eject" - else - dat += "
Please enter your bank pin to continue!" - dat += "
"
- dat += "[pin ? pin : "----"]
"
+ if(idcard.registered_account)
+ if(!idcard.registered_account.account_pin || pin == idcard.registered_account.account_pin)
+ dat += "
Balance: $[idcard.registered_account.account_balance]" + //dat += "
Offstation Balance: " + dat += "
" + dat += "Withdraw" + dat += "Change Pin" + //dat += "Account Settings" + dat += "Eject" + else + dat += "
Please enter your bank pin to continue!" + dat += "
"
+ dat += "[pin ? pin : "----"]
"
dat += "
" @@ -61,7 +63,7 @@ popup.open() /obj/machinery/atm/attackby(obj/item/I, mob/living/user) - if(istype(I, /obj/item/card)) + if(istype(I, /obj/item/card)) //input id! if(!held_card) var/obj/item/card/id/idcard = I if(!user.transferItemToLoc(I, src)) //check if you can put it in @@ -72,6 +74,15 @@ playsound(src, 'sound/machines/button.ogg', 50, FALSE) src.ui_interact(usr) + if(istype(I, /obj/item/stack/credits)) //feed money back into the machine! dont need a pin to donate stuff. + if(held_card) + var/obj/item/stack/credits/cred = I + var/obj/item/card/id/idcard = held_card + idcard.registered_account.account_balance = (idcard.registered_account.account_balance+cred.amount) + to_chat(usr, "You insert [cred] into the ATM.") + src.ui_interact(usr) + del(cred) + /obj/machinery/atm/Topic(href, href_list) . = ..() if(..()) @@ -126,13 +137,14 @@ var/obj/item/card/id/idcard = held_card if(idcard.registered_account) var/amount = input(user, "Choose amount", "Withdraw") as num|null - if(amount) + if(amount>0) amount = max(min( round(text2num(amount)), idcard.registered_account.account_balance),0) //make sure they aint taking out more then what they have to_chat(usr, "The machine prints out [amount] credits.") idcard.registered_account.account_balance = (idcard.registered_account.account_balance-amount) //subtract the amount they took out. var/obj/item/stack/credits/C = new /obj/item/stack/credits/(loc) C.amount = amount - C.update_desc() + if(usr.put_in_hands(C)) + to_chat(usr, "You take [C] out of the ATM.") src.ui_interact(usr) @@ -143,10 +155,11 @@ /obj/item/stack/credits name = "credits" singular_name = "credit" + desc = "Legal tender, a bundle of shiny metalic looking notes." icon = 'hyperstation/icons/obj/economy.dmi' icon_state = "cash" amount = 1 - max_amount = 100 + max_amount = 99999999 throwforce = 0 throw_speed = 2 throw_range = 2 @@ -154,7 +167,3 @@ full_w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE var/value = 1 - -/obj/item/stack/credits/proc/update_desc() - var/total_worth = amount*value - desc = "Legal tender, It's worth [total_worth] credit[( total_worth > 1 ) ? "s" : ""]" \ No newline at end of file diff --git a/hyperstation/icons/obj/economy.dmi b/hyperstation/icons/obj/economy.dmi index 6e6dec04..7f2db7b1 100644 Binary files a/hyperstation/icons/obj/economy.dmi and b/hyperstation/icons/obj/economy.dmi differ