Arranges the order at which starting funds is set and account creation is done.
This commit is contained in:
PsiOmega
2015-05-07 19:23:03 +02:00
parent 70fc66da29
commit 72dc583ef5
+3 -2
View File
@@ -141,10 +141,11 @@
if("finalise_create_account")
var/account_name = href_list["holder_name"]
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
create_account(account_name, starting_funds, src)
starting_funds = Clamp(starting_funds, 0, station_account.money) // Not authorized to put the station in debt.
starting_funds = min(starting_funds, fund_cap) // Not authrorized to give more than the fund cap.
starting_funds = min(starting_funds, fund_cap) // Not authorized to give more than the fund cap.
create_account(account_name, starting_funds, src)
if(starting_funds > 0)
//subtract the money
station_account.money -= starting_funds