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)

View File

@@ -78,6 +78,13 @@
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
banknote.transform = M
src.overlays += banknote
if(num == 0) // Less than one thaler, let's just make it look like 1 for ease
var/image/banknote = image('icons/obj/items.dmi', "spacecash1")
var/matrix/M = matrix()
M.Translate(rand(-6, 6), rand(-4, 8))
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
banknote.transform = M
src.overlays += banknote
src.desc = "They are worth [worth] Thalers."
/obj/item/weapon/spacecash/bundle/attack_self()