mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fix sub-1 thaler piles being invisible, disallow subdivision below 0.01
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user