Fix sub-1 thaler piles being invisible, disallow subdivision below 0.01

This commit is contained in:
GinjaNinja32
2014-11-24 18:56:41 +00:00
parent 20779aac33
commit a543d557b9
2 changed files with 10 additions and 0 deletions

View File

@@ -217,6 +217,7 @@ log transactions
if("transfer")
if(authenticated_account)
var/transfer_amount = text2num(href_list["funds_amount"])
transfer_amount = round(transfer_amount, 0.01)
if(transfer_amount <= 0)
alert("That is not a valid amount.")
else if(transfer_amount <= authenticated_account.money)
@@ -302,6 +303,7 @@ log transactions
previous_account_number = tried_account_num
if("e_withdrawal")
var/amount = max(text2num(href_list["funds_amount"]),0)
amount = round(amount, 0.01)
if(amount <= 0)
alert("That is not a valid amount.")
else if(authenticated_account && amount > 0)
@@ -327,6 +329,7 @@ log transactions
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
if("withdrawal")
var/amount = max(text2num(href_list["funds_amount"]),0)
amount = round(amount, 0.01)
if(amount <= 0)
alert("That is not a valid amount.")
else if(authenticated_account && amount > 0)