E-Wallet object added.

Made ATM to spawn e-wallets.

Untested.
This commit is contained in:
igalan
2014-04-15 05:27:23 +01:00
parent 106697a677
commit 10e76d9762
2 changed files with 19 additions and 3 deletions

View File

@@ -190,7 +190,7 @@ log transactions
dat += "<form name='withdrawal' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='withdrawal'>"
dat += "<input type='text' name='funds_amount' value='' style='width:200px; background-color:white;'><input type='submit' value='Withdraw funds'><br>"
dat += "<input type='text' name='funds_amount' value='' style='width:200px; background-color:white;'><input type='submit' value='Withdraw e-wallet'>" //fae change: fuck it, ewallet
dat += "</form>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=1'>Change account security level</a><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=2'>Make transfer</a><br>"
@@ -309,7 +309,11 @@ log transactions
//remove the money
authenticated_account.money -= amount
spawn_money(amount,src.loc)
//fae change {
// spawn_money(amount,src.loc)
spawn_ewallet(amount,src.loc)
//}
//create an entry in the account transaction log
var/datum/transaction/T = new()
@@ -402,3 +406,9 @@ log transactions
if(ishuman(human_user) && !human_user.get_active_hand())
human_user.put_in_hands(held_card)
held_card = null
//fae change {
/obj/machinery/atm/proc/spawn_ewallet(var/sum, loc)
var/obj/item/weapon/spacecash/ewallet/E = new /obj/item/weapon/spacecash/ewallet(loc)
E.worth = sum
//}

View File

@@ -71,4 +71,10 @@ proc/spawn_money(var/sum, spawnloc)
while(sum >= i)
sum -= i
new cash_type(spawnloc)
return
return
//Fae changes
/obj/item/weapon/spacecash/ewallet
name = "E-Wallet"
icon_state = "spacecash1000"
desc = "Worth: [worth] credits."