mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Finite money (#16044)
This commit is contained in:
@@ -244,17 +244,12 @@ log transactions
|
||||
if(amount <= 0)
|
||||
to_chat(usr, "[bicon(src)]<span class='warning'>That is not a valid amount.</span>")
|
||||
else if(authenticated_account && amount > 0)
|
||||
if(amount <= authenticated_account.money)
|
||||
if(amount > 100000) // Prevent crashes
|
||||
to_chat(usr, "<span class='notice'>[bicon(src)]The ATM's screen flashes, 'Maximum single withdrawal limit reached, defaulting to 100,000.'</span>")
|
||||
amount = 100000
|
||||
if(authenticated_account.charge(amount, null, "Credit withdrawal", machine_id, authenticated_account.owner_name))
|
||||
playsound(src, 'sound/machines/chime.ogg', 50, TRUE)
|
||||
|
||||
//remove the money
|
||||
if(amount > 100000) // prevent crashes
|
||||
to_chat(usr, "<span class='notice'>The ATM's screen flashes, 'Maximum single withdrawl limit reached, defaulting to 100,000.'</span>")
|
||||
amount = 100000
|
||||
withdraw_arbitrary_sum(amount)
|
||||
authenticated_account.charge(amount, null, "Credit withdrawal", machine_id, authenticated_account.owner_name)
|
||||
else
|
||||
to_chat(usr, "[bicon(src)]<span class='warning'>You don't have enough funds to do that!</span>")
|
||||
|
||||
if("balance_statement")
|
||||
if(authenticated_account)
|
||||
|
||||
Reference in New Issue
Block a user